/* NOVARE WMS — application-wide typography and table presentation standard.
   Loaded last so page-specific legacy styles converge on one visual system. */
:root{
    --wms-font-family: Inter,"Segoe UI",Arial,Helvetica,sans-serif;
    --wms-page-title-size: 23px;
    --wms-page-title-weight: 720;
    --wms-section-title-size: 13px;
    --wms-section-title-weight: 720;
    --wms-body-size: 10.5px;
    --wms-body-weight: 400;
    --wms-label-size: 9px;
    --wms-label-weight: 750;
    --wms-table-head-size: 8.75px;
    --wms-table-head-weight: 820;
    --wms-table-body-size: 10px;
    --wms-control-size: 10.5px;
    --wms-button-size: 10px;
    --wms-helper-size: 8.75px;
    --wms-line-height: 1.35;
}

html,body,button,input,select,textarea{
    font-family:var(--wms-font-family)!important;
}
body{
    font-size:var(--wms-body-size)!important;
    line-height:var(--wms-line-height);
}

/* Page titles — same hierarchy on every business screen. */
.page-title h1,
.gmd-title h1,
.settings-title h1,
.admin-page .page-title h1,
.wms-content>h1{
    margin-top:0!important;
    color:#16384A!important;
    font-size:var(--wms-page-title-size)!important;
    font-weight:var(--wms-page-title-weight)!important;
    line-height:1.15!important;
    letter-spacing:-.015em!important;
}
.page-subtitle,
.gmd-title p,
.settings-title>span,
.admin-page .page-subtitle{
    color:#758596!important;
    font-size:10.5px!important;
    font-weight:400!important;
    line-height:1.35!important;
}

/* Card / section hierarchy. */
.content-card-title,
.module-card-title,
.card-toolbar h3,
.toolbar h3,
.form-head h3,
.detail-header h3,
.settings-card .card-head h3,
.control-card-head h2,
.detail-section-title,
.drawer-section-title,
.item-unified-section h4{
    color:#26394b!important;
    font-size:var(--wms-section-title-size)!important;
    font-weight:var(--wms-section-title-weight)!important;
    line-height:1.25!important;
}
.module-count,
.card-toolbar span,
.toolbar span,
.form-head small,
.detail-header span,
.settings-card .card-head span,
.content-card-header small,
.item-unified-head>div>small{
    color:#7d8994!important;
    font-size:var(--wms-helper-size)!important;
    line-height:1.3!important;
}

/* Forms — one control and label scale across drawers, pages and cards. */
.wms-content label,
.gmd-modal label,
.admin-drawer label,
.ops-drawer label,
.operation-panel label,
.inventory-detail-panel label,
.count-detail-drawer label{
    font-size:var(--wms-label-size)!important;
    font-weight:var(--wms-label-weight)!important;
    line-height:1.25!important;
}
.form-control,
.form-select,
.wms-content input:not([type="checkbox"]):not([type="radio"]),
.wms-content select,
.wms-content textarea,
.gmd-modal input:not([type="checkbox"]):not([type="radio"]),
.gmd-modal select,
.gmd-modal textarea,
.admin-drawer input:not([type="checkbox"]):not([type="radio"]),
.admin-drawer select,
.admin-drawer textarea,
.ops-drawer input:not([type="checkbox"]):not([type="radio"]),
.ops-drawer select,
.ops-drawer textarea{
    font-size:var(--wms-control-size)!important;
    line-height:1.25!important;
}
.wms-content small,
.help-text,
.field-help,
.form-text,
.parameter-info small{
    font-size:var(--wms-helper-size)!important;
    line-height:1.35!important;
}

/* Buttons — labels and height should not change from module to module. */
.btn,
.primary,.secondary,.reset,
.gmd-clear-filters,
.admin-clear-filters,
.ops-page-actions button,
.wms-content button:not(.nav-link):not(.tab):not(.settings-tab):not(.gmd-sort-button):not(.admin-sort-button):not(.ops-code-link){
    font-size:var(--wms-button-size)!important;
    font-weight:650!important;
    line-height:1.2!important;
}

/* Universal business table standard.  Covers Bootstrap and custom tables. */
.wms-content table,
.gmd-modal table,
.admin-drawer table,
.ops-drawer table{
    font-family:var(--wms-font-family)!important;
    font-size:var(--wms-table-body-size)!important;
    line-height:1.3!important;
}
.wms-content table thead th,
.gmd-modal table thead th,
.admin-drawer table thead th,
.ops-drawer table thead th{
    padding:7px 9px!important;
    background:#f7f9fb!important;
    color:#607387!important;
    border-bottom:1px solid #dce4eb!important;
    font-size:var(--wms-table-head-size)!important;
    font-weight:var(--wms-table-head-weight)!important;
    line-height:1.25!important;
    text-transform:uppercase!important;
    letter-spacing:.025em!important;
    vertical-align:middle!important;
    white-space:nowrap;
}
.wms-content table tbody td,
.gmd-modal table tbody td,
.admin-drawer table tbody td,
.ops-drawer table tbody td{
    padding:7px 9px!important;
    color:#344b5d!important;
    border-bottom:1px solid #edf1f4!important;
    font-size:var(--wms-table-body-size)!important;
    font-weight:var(--wms-body-weight)!important;
    line-height:1.35!important;
    vertical-align:middle!important;
}
.wms-content table tbody tr:nth-child(even),
.gmd-modal table tbody tr:nth-child(even),
.admin-drawer table tbody tr:nth-child(even),
.ops-drawer table tbody tr:nth-child(even){
    background:#fbfcfd;
}
.wms-content table tbody tr:hover,
.gmd-modal table tbody tr:hover,
.admin-drawer table tbody tr:hover,
.ops-drawer table tbody tr:hover{
    background:#f2f7fb!important;
}

/* Sort labels remain visually part of the table header, never browser-style buttons. */
.gmd-sort-button,
.admin-sort-button,
.universal-sort-button,
.table-sort-button{
    border:0!important;
    background:transparent!important;
    padding:0!important;
    margin:0!important;
    color:inherit!important;
    font-family:inherit!important;
    font-size:inherit!important;
    font-weight:inherit!important;
    line-height:inherit!important;
    text-transform:inherit!important;
    letter-spacing:inherit!important;
    box-shadow:none!important;
    cursor:pointer!important;
}

/* Filter row — same density and alignment in Master Data, Administration and future grids. */
.gmd-filter-row th,
.admin-filter-row th,
.universal-filter-row th,
thead tr.table-filter-row th{
    padding:6px 7px!important;
    background:#fbfcfd!important;
}
.gmd-column-filter,
.admin-column-filter,
.universal-column-filter,
thead input[type="text"],
thead input[type="search"],
thead select{
    width:100%!important;
    min-width:70px!important;
    height:28px!important;
    min-height:28px!important;
    padding:4px 7px!important;
    border:1px solid #cbd6e2!important;
    border-radius:4px!important;
    background:#fff!important;
    color:#344b5d!important;
    font-size:9.5px!important;
    font-weight:400!important;
    text-transform:none!important;
    letter-spacing:0!important;
}

/* Clickable identifiers use the same emphasis everywhere. */
.module-link,
.gmd-code-link,
.ops-code-link,
.admin-link,
table a{
    color:#1A4A60!important;
    font-size:inherit!important;
    font-weight:780!important;
    text-decoration:none!important;
}
.module-link:hover,.gmd-code-link:hover,.ops-code-link:hover,.admin-link:hover,table a:hover{
    text-decoration:underline!important;
}

/* Drawers and modal headings. */
.gmd-modal h2,.gmd-modal h3,
.admin-drawer h2,.admin-drawer h3,
.ops-drawer-head h3,
.operation-panel.operation-drawer-open .module-card-title,
.inventory-detail-panel h2,
.count-detail-drawer h2{
    font-size:16px!important;
    font-weight:720!important;
    line-height:1.2!important;
}
.drawer-section-title,
.operation-detail-caption,
.gmd-modal .section-title,
.admin-drawer .section-title{
    font-size:9px!important;
    font-weight:820!important;
    letter-spacing:.045em!important;
}

/* Badges/status chips. */
.badge,.status-badge,.global-badge,.period-badge,
.readiness-ok,.readiness-bad,.readiness-warn{
    font-size:8.5px!important;
    font-weight:750!important;
    line-height:1.15!important;
}

/* Preserve dashboard hierarchy while aligning its typography with the app. */
.dashboard-section-title strong{font-size:12px!important;font-weight:720!important}
.dashboard-section-title span{font-size:9px!important}

/* Desktop density target (1920x1080) without shrinking text differently per page. */
@media (min-width:1100px){
    .wms-content{font-size:var(--wms-body-size)!important}
    .page-title{margin-bottom:11px!important}
    .module-card-header,.content-card-header{padding:10px 12px!important}
}


/* WMS60 — one checkbox standard across assignment cards, forms and grids. */
.wms-content input[type="checkbox"],
.gmd-modal input[type="checkbox"],
.admin-drawer input[type="checkbox"],
.ops-drawer input[type="checkbox"],
.owner-warehouse-card input[type="checkbox"],
.check-card input[type="checkbox"],
.permission-row input[type="checkbox"]{
    width:15px!important;
    height:15px!important;
    min-width:15px!important;
    min-height:15px!important;
    margin:0!important;
    padding:0!important;
    accent-color:#1F5A73;
    cursor:pointer;
    vertical-align:middle;
}
.wms-content input[type="checkbox"]:disabled,
.gmd-modal input[type="checkbox"]:disabled,
.admin-drawer input[type="checkbox"]:disabled{opacity:.55;cursor:not-allowed}
.owner-warehouse-card,.check-card{align-items:center!important}
.owner-warehouse-card:has(input[type="checkbox"]:checked),
.check-card:has(input[type="checkbox"]:checked){background:#f0f7fc!important;border-color:#9FBCCB!important}

/* WMS62 - universal compact choice/checkbox cards (Owner scope, Administration assignments, future selectors) */
.owner-warehouse-grid,.wms-choice-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px!important;margin-top:6px!important}
.owner-warehouse-card,.wms-choice-card{display:flex!important;align-items:center!important;gap:7px!important;min-height:34px!important;padding:6px 8px!important;border:1px solid #dce5ec!important;border-radius:6px!important;background:#fff!important;cursor:pointer!important;box-shadow:none!important;transition:background .12s ease,border-color .12s ease,box-shadow .12s ease!important}
.owner-warehouse-card:hover,.wms-choice-card:hover{background:#f8fbfd!important;border-color:#b8cedd!important}
.owner-warehouse-card:has(input[type="checkbox"]:checked),.wms-choice-card:has(input[type="checkbox"]:checked){background:#eef7fd!important;border-color:#9FBCCB!important;box-shadow:inset 2px 0 0 #1F5A73!important}
.owner-warehouse-card input[type="checkbox"],.wms-choice-card input[type="checkbox"]{flex:0 0 auto!important;width:15px!important;height:15px!important;margin:0!important;accent-color:#1F5A73!important}
.owner-warehouse-card span,.wms-choice-card span{display:flex!important;align-items:baseline!important;gap:5px!important;min-width:0!important}
.owner-warehouse-card strong,.wms-choice-card strong{display:inline!important;color:#344857!important;font-size:10px!important;font-weight:750!important;white-space:nowrap!important}
.owner-warehouse-card small,.wms-choice-card small{display:inline!important;margin:0!important;color:#7e8992!important;font-size:9px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
@media(max-width:1050px){.owner-warehouse-grid,.wms-choice-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:650px){.owner-warehouse-grid,.wms-choice-grid{grid-template-columns:1fr!important}}

/* WMS63 - Owner warehouse assignments match Administration/User Details choice cards */
.gmd-modal .owner-warehouse-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important;margin-top:6px!important}
.gmd-modal .owner-warehouse-card{display:flex!important;align-items:center!important;gap:7px!important;min-height:32px!important;padding:6px 8px!important;border:1px solid #dfe6eb!important;border-radius:5px!important;background:#fff!important;box-shadow:none!important;cursor:pointer!important}
.gmd-modal .owner-warehouse-card:hover{background:#f8fbfd!important;border-color:#c2d5e2!important}
.gmd-modal .owner-warehouse-card:has(input[type="checkbox"]:checked){background:#eef7fd!important;border-color:#9FBCCB!important;box-shadow:inset 2px 0 0 #1F5A73!important}
.gmd-modal .owner-warehouse-card input[type="checkbox"]{flex:0 0 auto!important;width:15px!important;height:15px!important;margin:0!important;accent-color:#1F5A73!important}
.gmd-modal .owner-warehouse-card span{display:flex!important;align-items:baseline!important;gap:5px!important;min-width:0!important;white-space:nowrap!important;overflow:hidden!important}
.gmd-modal .owner-warehouse-card strong{display:inline!important;flex:0 0 auto!important;font-size:9.5px!important;color:#31495c!important;font-weight:750!important}
.gmd-modal .owner-warehouse-card small{display:inline!important;margin:0!important;font-size:8.5px!important;color:#82909a!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
@media(max-width:1000px){.gmd-modal .owner-warehouse-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:650px){.gmd-modal .owner-warehouse-grid{grid-template-columns:1fr!important}}

/* WMS64 - desktop viewport lock and compact review screens (GLOBAL + warehouse contexts).
   The application shell no longer uses the browser/body vertical scrollbar. Header and
   workspace tabs stay fixed; each active review scrolls only inside the content viewport. */
@media (min-width:900px){
    html,body{height:100%!important;min-height:100%!important;overflow:hidden!important}
    .wms-shell{height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important}
    .wms-main{height:100dvh!important;min-height:0!important;max-height:100dvh!important;overflow:hidden!important}
    .wms-header{flex:0 0 50px!important;position:relative!important;top:auto!important}
    .workspace-tabs{flex:0 0 34px!important;min-height:34px!important;max-height:34px!important}
    .wms-content{flex:1 1 auto!important;min-height:0!important;height:auto!important;overflow:hidden!important}
    .workspace-screen.active{
        display:block!important;
        height:100%!important;
        min-height:0!important;
        max-height:100%!important;
        overflow-y:auto!important;
        overflow-x:hidden!important;
        overscroll-behavior:contain;
        scrollbar-gutter:stable;
    }
    .workspace-screen.inactive{display:none!important}

    /* Keep the page heading and its page-level actions visible while cards/tables scroll. */
    .workspace-screen.active>.page-title,
    .workspace-screen.active>.gmd-title{
        position:sticky!important;
        top:0!important;
        z-index:80!important;
        margin-top:0!important;
        padding-top:2px!important;
        padding-bottom:7px!important;
        background:var(--page,#f5f6f8)!important;
        box-shadow:0 5px 8px -9px rgba(22,56,74,.45);
    }
}

/* 1920x1080 / laptop-height density pass: retain readable typography while recovering
   enough vertical space that standard list views normally fit without a page scrollbar. */
@media (min-width:1100px) and (max-height:1100px){
    .wms-content{padding:11px 14px 12px!important}
    .page-title,.gmd-title{margin-bottom:7px!important}
    .page-title h1,.gmd-title h1{font-size:20px!important;line-height:1.08!important}
    .page-subtitle{margin-top:2px!important;font-size:9.5px!important;line-height:1.2!important}

    .content-card.mb-3,.module-card.mb-3{margin-bottom:8px!important}
    .content-card-header,.module-card-header{padding:7px 10px!important;min-height:32px!important}
    .content-card-body{padding:8px 10px!important}
    .module-toolbar{margin-bottom:7px!important;gap:6px!important}
    .module-summary{gap:7px!important;margin-bottom:7px!important}
    .module-summary>div{padding:6px 9px!important}

    .receiving-filter-grid{gap:6px!important}
    .receiving-filter-grid .form-label{margin-bottom:2px!important;font-size:8.5px!important}
    .receiving-filter-grid .form-control,
    .receiving-filter-grid .form-select{min-height:28px!important;height:28px!important;padding-top:2px!important;padding-bottom:2px!important;font-size:9.5px!important}
    .receiving-filter-grid .form-check{padding-bottom:3px!important}
    .receiving-summary{gap:7px!important;margin-bottom:7px!important}
    .receiving-summary>div{padding:6px 9px!important}
    .receiving-summary span{font-size:8px!important}
    .receiving-summary strong{margin-top:1px!important;font-size:14px!important;line-height:1.05!important}

    .table thead th,
    .module-table th,
    .receipt-like-results th,
    .receiving-table th{padding:5px 7px!important;font-size:8px!important;line-height:1.15!important}
    .table tbody td,
    .module-table td,
    .receipt-like-results td,
    .receiving-table td{padding:5px 7px!important;font-size:9px!important;line-height:1.18!important}
    .table .form-control,.table .form-select{min-height:27px!important;height:27px!important;font-size:9px!important}

    .btn,.form-control,.form-select{min-height:28px}
    .btn{padding-top:4px!important;padding-bottom:4px!important}
}
