/* Optima CRM — small brand overrides on top of the base CRM theme */

.add-message { color: #16a34a; font-weight: 600; }
.error-message { color: #dc2626; font-weight: 600; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Guard against dynamically-populated <select class="form-control"> collapsing
   to a tiny intrinsic width before its options are loaded via JS. */
select.form-control {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.crm-sidebar-brand { padding: 14px 20px; }
.crm-sidebar-brand a {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px 12px;
}
.crm-sidebar-logo { max-height: 40px; width: auto; }
.crm-sidebar-icon { display: none; max-height: 30px; }
.vertical-collpsed .crm-sidebar-brand a { padding: 8px; }
.vertical-collpsed .crm-sidebar-logo { display: none; }
.vertical-collpsed .crm-sidebar-icon { display: inline-block; }

/* ---- Dashboard stat cards ---- */
.optima-stat-row { margin-bottom: 4px; }
.optima-stat-card {
    border-radius: 14px;
    border: none;
    box-shadow: 0 2px 10px rgba(36, 27, 69, 0.06);
    overflow: hidden;
}
.optima-stat-card .card-body { padding: 22px; display: flex; align-items: center; gap: 16px; }
.optima-stat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; color: #fff; flex-shrink: 0;
}
.optima-stat-icon.bg-purple { background: linear-gradient(135deg, #5330c9, #7c5cf0); }
.optima-stat-icon.bg-blue   { background: linear-gradient(135deg, #4d7bff, #6a90ff); }
.optima-stat-icon.bg-mint   { background: linear-gradient(135deg, #4fd2c0, #7fe9d8); }
.optima-stat-icon.bg-amber  { background: linear-gradient(135deg, #f5a524, #ffca7a); }
.optima-stat-value { font-size: 26px; font-weight: 700; line-height: 1.1; margin: 0; }
.optima-stat-label { font-size: 13px; color: #8b87a3; margin: 2px 0 0; }

html.crm-dark .optima-stat-card,
body.crm-dark .optima-stat-card { background: #131a2e; box-shadow: none; border: 1px solid rgba(255,255,255,0.06); }
html.crm-dark .optima-stat-label,
body.crm-dark .optima-stat-label { color: #94a3b8; }

.optima-badge { padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.optima-badge-searching { background: #eef2ff; color: #4338ca; }
.optima-badge-closed { background: #dcfce7; color: #166534; }
.optima-badge-hold { background: #fef3c7; color: #92400e; }
.optima-badge-refine { background: #fee2e2; color: #991b1b; }
.optima-badge-default { background: #f1f5f9; color: #475569; }

html.crm-dark .optima-badge-default,
body.crm-dark .optima-badge-default { background: rgba(255,255,255,0.08); color: #cbd5e1; }

/* The vendor theme's app.min.css hardcodes ApexCharts legend text to a
   light-mode-only color with !important; override it for dark mode so
   chart legends stay readable instead of near-invisible on a dark page. */
html.crm-dark .apexcharts-legend-text,
body.crm-dark .apexcharts-legend-text {
    color: #cbd5e1 !important;
}
