/* CraftGrid typography font. Falls back to the Windows system stack if the font service is unavailable. */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/*==============================================================================
    FlowERP Theme
    Version : 1.0
==============================================================================*/

/*==============================================================================
    Design Tokens
==============================================================================*/

:root {
    /*==========================================================================
        Brand
    ==========================================================================*/

    --primary-color: #1769c2;
    --primary-hover: #1458a8;
    /*==========================================================================
        Background
    ==========================================================================*/

    --page-bg: #f5f7f7;
    --card-bg: #ffffff;
    /*==========================================================================
        Text
    ==========================================================================*/

    --text-color: #17324d;
    --text-muted: #66788a;
    /*==========================================================================
        Border
    ==========================================================================*/

    --border-color: #dce4e8;
    /*==========================================================================
        Radius
    ==========================================================================*/

    --border-radius: 8px;
    /*==========================================================================
        Sidebar
    ==========================================================================*/

    --sidebar-width: 260px;
    --sidebar-bg: #143d54;
    --sidebar-hover: #1d4d66;
    --sidebar-active: #1769c2;
    --sidebar-text: #f4f7fb;
    --sidebar-link-color: #d7e1e8;
    --sidebar-text-muted: #9fb1bf;
    --sidebar-text-active: #ffffff;
    --sidebar-active-indicator: #79b4e8;
    --sidebar-disabled: #718695;
    --sidebar-scrollbar: #3b5d72;
    /*==========================================================================
        Transition
    ==========================================================================*/

    --transition-fast: .2s ease;
    /*==========================================================================
    Buttons
==========================================================================*/

    --button-height: 38px;
    --button-font-size: 14px;
    --button-font-weight: 500;
    --button-padding: .5rem 1rem;
}


/*==============================================================================
    Global Styles
==============================================================================*/

html {
    font-size: 14px;
}

/* CraftGrid global typography: presentation-only; no business logic changes. */
:root {
    --cg-font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --cg-font-normal: 400;
    --cg-font-medium: 500;
    --cg-font-semibold: 600;
    --cg-font-bold: 700;
    /* Keep Bootstrap components on the same global type system. */
    --bs-body-font-family: var(--cg-font-family);
    --bs-body-font-weight: var(--cg-font-normal);
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: var(--cg-font-family);
    font-size: 14px;
    font-weight: var(--cg-font-normal);
    line-height: 1.5;
    color: var(--text-color);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Consistent enterprise/SaaS typography across CraftGrid. */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--cg-font-family);
}

button,
input,
select,
textarea,
.btn,
.form-control,
.form-select {
    font-family: var(--cg-font-family);
}

.btn {
    font-weight: var(--cg-font-semibold);
}


/*==============================================================================
    Typography
==============================================================================*/

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

p {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-muted) !important;
}


/*==============================================================================
    Box Sizing
==============================================================================*/

*,
*::before,
*::after {
    box-sizing: border-box;
}


/*==============================================================================
    Images
==============================================================================*/

img {
    max-width: 100%;
    height: auto;
}

/*==============================================================================
    Buttons
==============================================================================*/

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    height: var(--button-height);
    padding: var(--button-padding);
    border-radius: var(--border-radius);
    font-size: var(--button-font-size);
    font-weight: var(--button-font-weight);
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

    .btn:focus {
        box-shadow: none;
    }

    .btn i {
        font-size: 1rem;
    }


/* =========================================================
   CraftGrid authenticated navigation refinement
   Keep the login-page identity, but reduce visual noise.
   ========================================================= */

/* Parent module: Sell */
.craftgrid-authenticated-shell .sidebar .nav-item > .nav-link.active,
.craftgrid-authenticated-shell .sidebar .nav-item > .nav-link[aria-expanded="true"] {
    box-shadow: none;
}

/* Expanded child navigation: quieter, premium treatment. */
.craftgrid-authenticated-shell .sidebar .collapse .nav-link,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link {
    color: rgba(72, 206, 157, .92);
    background: transparent;
    border-radius: 8px;
    margin: 2px 8px 2px 10px;
    padding: 8px 12px 8px 28px;
    transition: background .15s ease, color .15s ease;
}

.craftgrid-authenticated-shell .sidebar .collapse .nav-link:hover,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,.055);
}

.craftgrid-authenticated-shell .sidebar .collapse .nav-link.active,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link.active {
    color: #ffffff;
    background: rgba(7, 138, 99, .34);
    box-shadow: inset 3px 0 0 #72e0b2;
    font-weight: 700;
}

/* Keep notification/count pills readable without dominating the navigation. */
.craftgrid-authenticated-shell .sidebar .badge,
.craftgrid-authenticated-shell .sidebar .nav-count {
    font-weight: 800;
}

/* =========================================================
   Delivery Sales Order column
   Typography-first emphasis: no decorative gold badge.
   ========================================================= */
.craftgrid-authenticated-shell .craftgrid-sales-order-header {
    background: transparent !important;
    color: #173e54 !important;
    font-weight: 800 !important;
    border-bottom: 2px solid rgba(216,177,90,.38) !important;
}

.craftgrid-authenticated-shell .craftgrid-sales-order-cell {
    background: rgba(216,177,90,.035) !important;
    box-shadow: inset 2px 0 0 rgba(216,177,90,.24);
}

.craftgrid-authenticated-shell .craftgrid-sales-order-badge {
    display: inline;
    padding: 0;
    min-height: 0;
    border-radius: 0;
    background: transparent !important;
    color: #123c52 !important;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
}

.craftgrid-authenticated-shell .craftgrid-sales-order-badge a {
    color: #078a63 !important;
    font-weight: 800;
    text-decoration: none;
}

.craftgrid-authenticated-shell .craftgrid-sales-order-badge a:hover {
    color: #066d4e !important;
    text-decoration: underline;
}

/* Make the active Deliveries item the strongest child signal,
   while leaving the parent Sell module restrained. */
.craftgrid-authenticated-shell .sidebar .collapse .nav-link.active::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 16px;
    margin-left: -16px;
    margin-right: 10px;
    vertical-align: -3px;
    border-radius: 3px;
    background: #72e0b2;
}

@media (max-width: 991.98px) {
    .craftgrid-authenticated-shell .sidebar .collapse .nav-link,
    .craftgrid-authenticated-shell .sidebar .collapsing .nav-link {
        margin-left: 6px;
        padding-left: 24px;
    }

    .craftgrid-authenticated-shell .craftgrid-sales-order-cell {
        background: transparent !important;
        box-shadow: none;
    }
}


/* =========================================================
   Final authenticated sidebar refinement
   Keep the login-page navy/green identity restrained:
   neutral submenu items, green only for the active item.
   ========================================================= */

.craftgrid-authenticated-shell .sidebar .collapse .nav-link,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link {
    color: rgba(226, 238, 242, .78) !important;
    background: transparent !important;
    font-weight: 500;
}

.craftgrid-authenticated-shell .sidebar .collapse .nav-link i,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link i {
    color: rgba(190, 210, 219, .82) !important;
}

.craftgrid-authenticated-shell .sidebar .collapse .nav-link:hover,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link:hover {
    color: #ffffff !important;
    background: rgba(255,255,255,.055) !important;
}

.craftgrid-authenticated-shell .sidebar .collapse .nav-link:hover i,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link:hover i {
    color: #72e0b2 !important;
}

.craftgrid-authenticated-shell .sidebar .collapse .nav-link.active,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link.active {
    color: #ffffff !important;
    background: rgba(7, 138, 99, .32) !important;
    font-weight: 700 !important;
    box-shadow: inset 3px 0 0 #72e0b2 !important;
}

.craftgrid-authenticated-shell .sidebar .collapse .nav-link.active i,
.craftgrid-authenticated-shell .sidebar .collapsing .nav-link.active i {
    color: #72e0b2 !important;
}

/* Count badges remain strong enough to scan, but slightly less dominant. */
.craftgrid-authenticated-shell .sidebar .collapse .badge,
.craftgrid-authenticated-shell .sidebar .collapse .nav-count {
    box-shadow: none !important;
}

/* Parent module should not compete with its active child. */
.craftgrid-authenticated-shell .sidebar .nav-item > .nav-link[aria-expanded="true"] {
    box-shadow: none !important;
}

/* Do not add a second pseudo-indicator when an existing active indicator is present. */
.craftgrid-authenticated-shell .sidebar .collapse .nav-link.active::before {
    width: 3px;
    background: #72e0b2;
}
