/* =========================================================
   Invoice / DO section headers (your existing styles)
   ========================================================= */

/* Teal header bar for all sections (Invoice, DO, etc.) */
.card-header.invoice-section-header {
    background-color: #007f7f !important;
    color: #ffffff !important;
    border-bottom: none;
    cursor: pointer;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

/* Title + icon inside header */
.invoice-section-header .section-title {
    font-weight: 600;
}

.invoice-section-header .section-toggle-icon {
    font-size: 0.9rem;
}

/* Make any links/buttons inside header white */
.invoice-section-header .btn-link,
.invoice-section-header a {
    color: #ffffff !important;
}

    .invoice-section-header .btn-link:hover,
    .invoice-section-header a:hover {
        text-decoration: none;
        opacity: 0.9;
    }


/* =========================================================
   Base app font & background
   ========================================================= */

html,
body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f4f4f5;
}


/* =========================================================
   ERP Shell
   ========================================================= */

.bb-shell {
    display: flex;
    min-height: 100vh;
    padding: 1rem;
    background: radial-gradient(circle at top left, #e5e7eb 0, #f4f4f5 35%, #e4e4e7 100%);
}

/* Main area (top bar + content), shifted by sidebar width */
.bb-shell-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-left: 280px; /* sidebar width + gap */
    transition: margin-left 0.2s ease;
}

.bb-shell.bb-shell--collapsed .bb-shell-main {
    margin-left: 110px;
}


/* =========================================================
   Sidebar (AppSidebar)
   ========================================================= */

.bb-sidebar {
    position: fixed;
    inset-block: 1rem;
    left: 1rem;
    width: 260px;
    border-radius: 1.4rem;
    background: #ffffff;
    border: 1px solid #d0d7e2;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width 0.2s ease;
    z-index: 100;
}

.bb-sidebar--collapsed {
    width: 80px;
}

/* Brand row */
.bb-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.bb-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.4);
}

.bb-brand-text {
    display: flex;
    flex-direction: column;
}

.bb-brand-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
}

.bb-brand-subtitle {
    font-size: 0.72rem;
    color: #6b7280;
}

/* Collapse button */
.bb-sidebar__collapse-btn {
    margin-left: auto;
    border: none;
    background: rgba(15, 23, 42, 0.03);
    border-radius: 999px;
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

    .bb-sidebar__collapse-btn:hover {
        background: rgba(15, 23, 42, 0.06);
        color: #111827;
        transform: translateY(-1px);
    }

/* Scroll area */
.bb-sidebar__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0.5rem 0.75rem;
}

/* slim scrollbar */
.bb-sidebar__scroll {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

    .bb-sidebar__scroll::-webkit-scrollbar {
        width: 6px;
    }

    .bb-sidebar__scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .bb-sidebar__scroll::-webkit-scrollbar-thumb {
        background-color: #cbd5e1;
        border-radius: 999px;
    }

/* Section spacing */
.bb-sidebar-section + .bb-sidebar-section {
    margin-top: 0.4rem;
}

/* Section header (MASTER DATA, SALES, etc.) */
.bb-section-header {
    width: 100%;
    padding: 0.4rem 0.9rem 0.25rem;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #344054;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

.bb-section-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.bb-section-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #2563eb;
    opacity: 0.8;
}

.bb-section-chevron {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* hover on section */
.bb-section-header:hover {
    background-color: #f9fafb;
    color: #4b5563;
    padding-left: 1rem;
}

/* Small separator under dashboard */
.bb-sidebar-separator {
    height: 1px;
    background: rgba(229, 231, 235, 0.9);
    margin: 0 0.75rem 0.5rem;
}

/* Menu */
.bb-menu {
    margin: 0.2rem 0 0.35rem;
}

/* Individual items */
.bb-menu-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.95rem;
    margin: 0.05rem 0;
    font-size: 0.85rem;
    text-decoration: none;
    border-radius: 0.9rem;
    color: #2d3648;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

    .bb-menu-item .bb-menu-icon {
        width: 22px;
        display: inline-flex;
        justify-content: center;
        font-size: 1rem;
    }

    .bb-menu-item .bb-menu-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Active + hover */
    .bb-menu-item.active {
        background: #dbeafe;
        color: #1d4ed8;
        font-weight: 700;
        box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
    }

    .bb-menu-item:hover {
        background: #eef2ff;
        color: #1e3a8a;
        transform: translateX(2px);
        box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
    }

/* Primary dashboard pill */
.bb-menu-item--primary {
    background: #0f172a;
    color: #f9fafb;
    font-weight: 600;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.7);
    transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

    .bb-menu-item--primary:hover,
    .bb-menu-item--primary.active {
        background: #1d4ed8;
        color: #f9fafb;
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.26);
    }

/* Badge */
.bb-menu-badge {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 600;
}

/* Footer */
.bb-sidebar__footer {
    padding: 0.65rem 1rem 0.85rem;
    border-top: 1px solid rgba(229, 231, 235, 0.9);
    font-size: 0.75rem;
    color: #6b7280;
    background: rgba(248, 250, 252, 0.96);
}

.bb-footer-label {
    display: block;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bb-footer-value {
    font-weight: 600;
    color: #111827;
}

/* Dashboard menu block */
.bb-menu--top {
    margin: 0.5rem 0 0.55rem;
}

/* Collapsed: hide labels, keep icons */
.bb-sidebar--collapsed .bb-brand-text,
.bb-sidebar--collapsed .bb-menu-text,
.bb-sidebar--collapsed .bb-section-title span:not(.bb-section-dot),
.bb-sidebar--collapsed .bb-sidebar__footer {
    display: none;
}


/* Sidebar scrollbar in dark */
.bb-theme-dark .bb-sidebar__scroll {
    scrollbar-color: #4b5563 transparent;
}

    .bb-theme-dark .bb-sidebar__scroll::-webkit-scrollbar-thumb {
        background-color: #4b5563;
    }


/* =========================================================
   Top bar
   ========================================================= */

.bb-topbar {
    border-radius: 1rem;
    padding: 0.55rem 1rem;
    margin-bottom: 0.9rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0.5rem;
    z-index: 40;
    backdrop-filter: blur(18px);
}

.bb-topbar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: auto;
}

/* Theme toggle */
.bb-theme-toggle {
    border: none;
    background: transparent;
    padding: 0.25rem 0.45rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1.1rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

    .bb-theme-toggle:hover {
        background-color: rgba(15, 23, 42, 0.06);
        color: #111827;
        transform: translateY(-1px);
    }

/* Breadcrumb */
.bb-breadcrumb {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bb-breadcrumb-section {
    font-weight: 600;
}

.bb-breadcrumb-page {
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.04em;
    color: #111827;
}

.bb-breadcrumb-separator {
    opacity: 0.6;
}

/* Account pill */
.bb-account-menu {
    margin-left: auto;
}

.bb-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(209, 213, 219, 0.9);
    background: rgba(248, 250, 252, 0.96);
    font-size: 0.78rem;
    color: #111827;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.bb-account-user {
    font-weight: 600;
}

.bb-account-company {
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.9);
    color: #4b5563;
}

/* Account dropdown */
.bb-account-dropdown {
    font-size: 0.8rem;
}


/* =========================================================
   Content area
   ========================================================= */

.bb-content {
    padding: 0.25rem 0.25rem 0;
}

.bb-content-inner {
    max-width: 1340px;
    margin: 0.5rem auto 0;
    padding: 0.9rem 1.1rem 1.4rem;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.9);
}

    /* remove extra padding from inner bootstrap containers */
    .bb-content-inner .container,
    .bb-content-inner .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }


/* =========================================================
   Dashboard (Vercel-style tiles)
   ========================================================= */

.bb-home {
    max-width: 1120px;
    margin: 0 auto;
}

.bb-home-header {
    margin-bottom: 1.75rem;
}

.bb-home-title {
    font-size: 2.3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
}

.bb-home-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
}

/* Responsive card grid */
.bb-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

/* Vercel-like card */
.bb-home-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1.15rem;
    border-radius: 1.2rem;
    background: radial-gradient(circle at top left, #f9fafb 0, #f3f4f6 40%, #eef2ff 100%);
    border: 1px solid rgba(226, 232, 240, 0.95);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

    .bb-home-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.24), transparent 55%);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease;
    }

    .bb-home-card:hover {
        transform: translateY(-4px);
        border-color: rgba(59, 130, 246, 0.85);
        box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
        background: radial-gradient(circle at top left, #f9fafb 0, #e5f0ff 45%, #e0ecff 100%);
    }

        .bb-home-card:hover::before {
            opacity: 1;
        }

/* Icon circle */
.bb-home-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.7rem;
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
    font-size: 1.4rem;
}

/* Text */
.bb-home-card-title {
    font-weight: 600;
    font-size: 0.98rem;
    margin-bottom: 0.2rem;
    color: #111827;
}

.bb-home-card-text {
    font-size: 0.82rem;
    color: #6b7280;
    line-height: 1.35;
}


/* =========================================================
   Dark theme (bb-theme-dark on bb-shell)
   ========================================================= */

.bb-theme-dark.bb-shell {
    background: radial-gradient(circle at top left, #111827 0, #020617 55%, #000000 100%);
}

.bb-theme-dark .bb-sidebar {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(55, 65, 81, 0.9);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(15, 23, 42, 1);
}

.bb-theme-dark .bb-sidebar__brand {
    border-bottom-color: rgba(31, 41, 55, 0.9);
    background: linear-gradient(135deg, #020617, #0b1120);
}

.bb-theme-dark .bb-brand-title {
    color: #f9fafb;
}

.bb-theme-dark .bb-brand-subtitle {
    color: #9ca3af;
}

.bb-theme-dark .bb-section-header {
    color: #9ca3af;
}

.bb-theme-dark .bb-section-dot {
    background: #60a5fa;
}

.bb-theme-dark .bb-menu-item {
    color: #e5e7eb;
}

    .bb-theme-dark .bb-menu-item:hover {
        background: rgba(15, 23, 42, 0.9);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.9);
    }

    .bb-theme-dark .bb-menu-item.active {
        background: linear-gradient(135deg, #1d4ed8, #22c55e);
        color: #f9fafb;
    }

.bb-theme-dark .bb-menu-item--primary {
    background: #111827;
    color: #f9fafb;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 1);
}

    .bb-theme-dark .bb-menu-item--primary:hover,
    .bb-theme-dark .bb-menu-item--primary.active {
        background: #1d4ed8;
    }

.bb-theme-dark .bb-sidebar__footer {
    border-top-color: rgba(31, 41, 55, 0.9);
    background: #020617;
    color: #9ca3af;
}

.bb-theme-dark .bb-footer-value {
    color: #f9fafb;
}

/* Topbar dark */
.bb-theme-dark .bb-topbar {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(31, 41, 55, 0.95);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 1), 0 0 0 1px rgba(15, 23, 42, 1);
    color: #e5e7eb;
}

.bb-theme-dark .bb-theme-toggle {
    color: #e5e7eb;
}

    .bb-theme-dark .bb-theme-toggle:hover {
        background-color: rgba(31, 41, 55, 0.9);
        color: #f9fafb;
    }

.bb-theme-dark .bb-breadcrumb {
    color: #9ca3af;
}

.bb-theme-dark .bb-breadcrumb-page {
    color: #f9fafb;
}

.bb-theme-dark .bb-account-btn {
    background: #020617;
    border-color: rgba(55, 65, 81, 0.9);
    color: #e5e7eb;
}

.bb-theme-dark .bb-account-company {
    background: rgba(31, 41, 55, 0.9);
    color: #e5e7eb;
}

/* Content card dark */
.bb-theme-dark .bb-content-inner {
    background: radial-gradient(circle at top left, #020617, #020617 40%, #020617 100%);
    border-color: rgba(31, 41, 55, 0.95);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 1), 0 0 0 1px rgba(15, 23, 42, 1);
    color: #e5e7eb;
}

/* Dashboard tiles dark */
.bb-theme-dark .bb-home-title {
    color: #f9fafb;
}

.bb-theme-dark .bb-home-subtitle {
    color: #9ca3af;
}

.bb-theme-dark .bb-home-card {
    background: radial-gradient(circle at top left, #020617 0, #020617 40%, #020617 100%);
    border-color: rgba(31, 41, 55, 0.95);
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(15, 23, 42, 1);
}

.bb-theme-dark .bb-home-card-icon {
    background: rgba(59, 130, 246, 0.25);
    color: #e5edff;
}

.bb-theme-dark .bb-home-card-title {
    color: #e5e7eb;
}

.bb-theme-dark .bb-home-card-text {
    color: #9ca3af;
}

.bb-theme-dark .bb-home-card:hover {
    border-color: rgba(96, 165, 250, 1);
    background: radial-gradient(circle at top left, #020617 0, #020617 30%, #0b1120 100%);
}

.bb-account-user {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.1;
}

.bb-account-companyline {
    font-size: 0.72rem;
    color: #4b5563;
    line-height: 1.1;
}

.bb-account-company-name {
    margin-left: 0.25rem;
    font-weight: 500;
}

.bb-theme-dark .bb-account-companyline {
    color: #e5e7eb;
}
/* Red border + focus halo for invalid Syncfusion dropdowns
   Use with: CssClass="bb-invalid" on SfComboBox / SfDropDownList */
.bb-invalid.e-control-wrapper,
.bb-invalid.e-float-input,
.bb-invalid.e-input-group,
.bb-invalid.e-ddl,
.bb-invalid.e-combobox {
    border: 1px solid #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220,53,69,.25) !important;
}

    /* Inner input – keep flat, border comes from wrapper */
    .bb-invalid.e-control-wrapper input.e-input,
    .bb-invalid.e-float-input input.e-input {
        border: none !important;
        box-shadow: none !important;
    }

/* ===============================
   GLOBAL ERP TYPOGRAPHY
================================ */
body {
    font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 13px;
    color: #1f2937; /* slate-800 */
}

/* ===============================
   GRID HEADERS
================================ */
.table thead th {
    font-size: 12.75px;
    font-weight: 600;
    color: #374151; /* gray-700 */
    vertical-align: middle;
}

/* Grid cells */
.table tbody td {
    font-size: 12.5px;
    vertical-align: middle;
}

/* ===============================
   MAIN SECTION HEADER
================================ */
.invoice-section-header {
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ===============================
   FBR DETAILS SECTION
================================ */
.fbr-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f766e; /* teal-700 */
}

/* FBR labels */
.fbr-label {
    font-size: 11.75px;
    font-weight: 500;
    color: #4b5563; /* gray-600 */
}

/* FBR inputs */
.fbr-input,
.fbr-input input {
    font-size: 12.5px;
}

/* ===============================
   INPUT FIELDS (GLOBAL)
================================ */
.form-control,
.e-input,
.e-control {
    font-size: 12.5px;
}
