/* B-Core Nexus — Global Theme 
   Version: 6.0 (blnt_theme edition)
*/

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

:root {
    /* --- B-CORE BRAND COLORS --- */
    --brand-blue: #3B82F6;
    --brand-blue-hover: #2563EB;
    --brand-blue-light: rgba(59, 130, 246, 0.15);
    --navy-dark: #0F172A;
    --navy-mid: #1E293B;

    /* Layout Colors */
    --sidebar-bg: #FFFFFF;
    --main-bg: #F8FAFC;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --border-subtle: #E2E8F0;
    --active-bg: #EFF6FF;
    --active-accent: #3B82F6;

    /* --- FRAPPE OVERRIDES --- */
    --navbar-bg: #0F172A !important;
    --primary: #3B82F6 !important;
    --btn-primary-bg: #3B82F6 !important;
    --font-size-base: 14px !important;

    /* --- TYPOGRAPHY TOKENS (Inter) --- */
    --font-stack: 'Inter', sans-serif !important;
    --sans-serif: 'Inter', sans-serif !important;

    /* --- GEOMETRIC RADIUS TOKENS --- */
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;

    /* --- CORPORATE BLUE ANCHOR --- */
    --focus-ring-color: rgba(0, 82, 255, 0.12);
    --focus-border-color: #0052FF;
}

/* --- 1. GLOBAL FONT & TYPOGRAPHY --- */
html, body, h1, h2, h3, h4, h5, h6, div, span, p, a, button, input, td, th, label, select, textarea, .form-control, .widget, .datatable, .frappe-card, .sidebar-item-label {
    font-family: var(--font-stack, 'Inter', sans-serif) !important;
}

/* Fine-tuned font sizes for clean, geometric look */
h1, .page-title {
    font-size: 20px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.5 !important;
}

h2, h3, h4, h5, h6 {
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
    line-height: 1.5 !important;
}

/* Compact tracking on navigation / list anchor links */
.sidebar-item-label,
.list-sidebar-button,
.desk-sidebar .standard-sidebar-item a,
.sidebar-menu-links a {
    letter-spacing: -0.01em !important;
    line-height: 1.5 !important;
}

/* --- 2. NAVBAR LOGO & TITLE --- */

/* CSS-native image source replacement — Hide Frappe's native logos */
@keyframes force-hide-logo {
    from, to {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        width: 0 !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        pointer-events: none !important;
    }
}

#brand-logo,
.navbar-brand:not(.sidebar-toggle-btn) img,
.navbar-home img,
.sidebar-brand img {
    animation: force-hide-logo 0.001s forwards !important;
    display: none !important;
}

.navbar-brand:not(.sidebar-toggle-btn) svg,
.navbar-home svg,
img.app-logo ~ svg,
.sidebar-brand svg {
    display: none !important;
}

/* Robust Logo Replacement via CSS (prevents Vue.js VDOM conflicts) */
.navbar-brand:not(.sidebar-toggle-btn)::before,
.navbar-home::before,
.sidebar-brand::before {
    content: "";
    display: inline-block !important;
    background-image: url('/assets/blnt_theme/images/logo.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: #FFFFFF !important;
    border-radius: 50% !important;
    padding: 4px !important;
    height: 32px !important;
    width: 32px !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
    vertical-align: middle !important;
    margin-right: 8px !important;
}

/* Maintain Nexus Title Injection */
.navbar-brand:not(.sidebar-toggle-btn)::after {
    content: "B-Core Nexus" !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    margin-left: 8px;
    letter-spacing: -0.01em !important;
}


/* Fix Notification Bubbles */
html body header.navbar {
    background-color: var(--navy-dark) !important;
    border-bottom: 1px solid #1E293B !important;
}

html body header.navbar .dropdown-notifications>.nav-link {
    background-color: #FFFFFF !important;
    border-radius: 50% !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

/* --- 3. Text Descender & Line Height Fix (Clean typography) --- */
.standard-sidebar-item .sidebar-item-label,
.widget-shortcut .widget-label,
.app-item .app-title {
    line-height: 1.5 !important;
    padding-bottom: 4px !important;
    display: inline-block !important;
    overflow: visible !important;
}

/* --- 4. GLOBAL BUTTONS --- */
.btn-primary {
    background-color: var(--brand-blue) !important;
    border-color: var(--brand-blue) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25) !important;
}

/* --- 5. FIXED FOOTER BRANDING --- */
footer.page-footer, 
.web-footer {
    position: fixed !important;
    bottom: 0 !important;
    width: 100% !important;
    background-color: #FFFFFF !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 8px 0 !important;
    z-index: 1050 !important;
    font-size: 12px !important;
    color: var(--text-muted) !important;
}

.layout-main-section, .page-container {
    padding-bottom: 80px !important;
}

/* --- 6. SIDEBAR LOGO & BRANDING --- */
.body-sidebar-container .sidebar-header .sidebar-item-icon,
.layout-side-section .sidebar-header .sidebar-item-icon {
    background-color: #FFFFFF !important;
    border-radius: 50% !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
}

.sidebar-header .header-subtitle {
    font-size: 0 !important;
    visibility: hidden !important;
}
.sidebar-header .header-subtitle::before {
    content: "Bcore Nexus" !important;
    font-size: 11px !important;
    visibility: visible !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
}

/* --- 7. LOGIN PAGE CLEANUP --- */
body[data-path="login"] .page-card {
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

/* Hide promotional banners */
.promotional-banner,
.promotional-banners {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   8. PREMIUM DESIGN SYSTEM — RADIUS, FORM FIELDS, TABLES & SIDEBAR
   Version 6.0 additions
═══════════════════════════════════════════════════════════════════ */

/* --- 8a. Radius Token Enforcement -------------------------------- */
/* Data cards & workspace blocks */
.frappe-card,
.workspace-block,
.widget,
.widget-head,
.number-card,
.dashboard-card {
    border-radius: var(--border-radius-lg, 8px) !important;
}

/* Input boxes */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
    border-radius: var(--border-radius-md, 6px) !important;
}

/* Action buttons */
.btn,
.btn-primary,
.btn-default,
.btn-secondary {
    border-radius: var(--border-radius-md, 6px) !important;
}

/* Child / inline table cells */
.grid-static-col,
.editable-row .form-control {
    border-radius: var(--border-radius-sm, 4px) !important;
}

/* --- 8b. Form Field Borders & Focus State ------------------------- */
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea,
select {
    border: 1px solid #E2E8F0 !important;
    transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: var(--focus-border-color, #0052FF) !important;
    box-shadow: 0 0 0 3px var(--focus-ring-color, rgba(0, 82, 255, 0.12)) !important;
}

/* --- 8c. Table & List View Optimizations ------------------------- */
/* High-contrast grid lines */
.datatable .dt-cell,
.list-row-container .list-row,
.grid-body .grid-row {
    border-bottom: 1px solid #E2E8F0 !important;
}

.datatable .dt-header .dt-cell {
    border-bottom: 2px solid #CBD5E1 !important;
    background-color: #F8FAFC !important;
}

/* Child table inner borders */
.grid-body .editable-row td,
.grid-body .grid-static-col {
    border-right: 1px solid #E2E8F0 !important;
}

/* Hover tint on list / grid rows */
.list-row:hover,
.grid-row:hover {
    background-color: #F8FAFC !important;
    transition: background-color 0.12s ease !important;
}

/* --- 8d. Sidebar Compact Spacing & Tracking ---------------------- */
/* App-wise sidebar navigation items */
.desk-sidebar .standard-sidebar-item,
.sidebar-menu-links .sidebar-item,
.body-sidebar-container .standard-sidebar-item {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

.desk-sidebar .standard-sidebar-item a,
.sidebar-menu-links a,
.body-sidebar-container .standard-sidebar-item a {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    font-size: 13px !important;
    letter-spacing: -0.01em !important;
    line-height: 1.4 !important;
}

/* Sidebar section group headings */
.desk-sidebar .sidebar-group-title,
.sidebar-label {
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #94A3B8 !important;
    margin-top: 12px !important;
    margin-bottom: 2px !important;
    padding-left: 8px !important;
}