body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f5f7fb;
    color: #18202a
}

.topbar {
    background: #26384f;
    color: white;
    padding: 12px 24px
}

.topbar h1 {
    display: inline-block;
    margin: 0 24px 0 0
}

.topbar a {
    color: white;
    margin-right: 14px;
    text-decoration: none
}

.topbar .nav-action {
    background: #fff;
    color: #26384f;
    border-radius: 3px;
    padding: 7px 10px;
    font-weight: bold
}

main {
    padding: 24px
}

.card {
    background: white;
    border: 1px solid #d8dee9;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px #0001
}

.grid2 {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 18px
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 8px;
}

.sticky-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    margin-top: 12px;
    position: relative
}

.sticky-table-wrap table {
    margin-top: 0
}

.sticky-bond-table {
    width: max-content;
    min-width: 100%
}

.sticky-bond-table th, .sticky-bond-table td {
    white-space: nowrap
}

.sticky-col {
    position: sticky;
    z-index: 2;
    background: #fff
}

th.sticky-col {
    z-index: 4;
    background: #edf1f7
}

td.sticky-left, th.sticky-left {
    box-shadow: 2px 0 0 #d8dee9
}

td.sticky-right, th.sticky-right {
    box-shadow: -2px 0 0 #d8dee9
}

.sticky-sku {
    left: 0;
    min-width: 110px;
    width: 110px
}

.sticky-name {
    left: 110px;
    min-width: 190px;
    width: 190px
}

.sticky-sku .autocomplete-wrapper {
    width: 110px
}

.sticky-name .autocomplete-wrapper {
    width: 190px
}

.bonds-table .sticky-actions {
    right: 0;
    min-width: 92px
}

.bonds-table .sticky-status {
    right: 92px;
    min-width: 135px
}

.bonds-table .sticky-days {
    right: 227px;
    min-width: 60px
}

.bonds-table .sticky-assigned {
    right: 287px;
    min-width: 110px
}

.order-bond-table .sticky-actions {
    right: 0;
    min-width: 70px
}

.order-bond-table .sticky-issue {
    right: 70px;
    min-width: 165px
}

.order-bond-table .sticky-available {
    right: 235px;
    min-width: 110px
}

.order-bond-table .sticky-assigned {
    right: 345px;
    min-width: 80px
}

.order-bond-table .sticky-days {
    right: 465px;
    min-width: 60px
}

.order-bond-table.issue-single .sticky-issue {
    min-width: 82px
}

.order-bond-table.issue-single .sticky-available {
    right: 152px
}

.order-bond-table.issue-single .sticky-assigned {
    right: 262px
}

.order-bond-table.issue-single .sticky-days {
    right: 342px
}

th, td {
    border: 1px solid #d8dee9;
    padding: 7px;
    text-align: left
}

th {
    background: #edf1f7
}

.spreadsheet input[type=number] {
    width: 90px
}

.issue-quantity-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap
}

.issue-quantity-inputs input[type=number] {
    width: 55px
}

.form-grid {
    display: grid;
    grid-template-columns:repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    align-items: end
}

.form-grid label {
    display: flex;
    flex-direction: column;
    font-weight: bold
}

.inline {
    display: flex;
    gap: 8px;
    align-items: center
}

.mini {
    display: inline
}

.message {
    background: #e3f7e7;
    border: 1px solid #8bd199;
    padding: 10px;
    margin-bottom: 12px
}

.error {
    background: #ffe7e7;
    border: 1px solid #d68282;
    padding: 10px;
    margin-bottom: 12px
}

button, .button-link {
    cursor: pointer;
    padding: 5px 12px
}

.button-link {
    display: inline-block;
    background: #26384f;
    color: white;
    text-decoration: none;
    border-radius: 3px
}

.button-link.secondary {
    background: #66758a
}

input, select {
    padding: 6px
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px
}

.section-heading h2 {
    margin: 0
}

.selected-row {
    background: #e5f0ff
}

.selected-row .sticky-col {
    background: #e5f0ff
}

.order-for {
    display: flex;
    flex-direction: column;
    font-weight: bold;
    max-width: 560px;
    margin: 16px 0
}

.search-form {
    margin: 16px 0
}

.search-form input {
    min-width: 300px
}

.order-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #d8dee9
}

.bar-chart-header{
    margin: 4px 0;
}

.bar-chart-help {
    color: #566273;
    margin: 4px 0;
}

.bar-chart {
    min-height: 220px;
    display: flex;
    align-items: end;
    gap: 10px;
    border-left: 1px solid #cbd3df;
    border-bottom: 1px solid #cbd3df;
    padding: 4px 10px 0;
    margin-top: 8px;
    overflow-x: auto
}

.group {
    min-width: 64px;
    text-align: center
}

.bar-values {
    height: 34px;
    font-size: 12px;
    color: #566273;
    display: flex;
    justify-content: center;
    gap: 5px
}

.bars {
    height: 170px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 5px
}

.bar {
    width: 20px;
    border-radius: 4px 4px 0 0;
    min-height: 0
}

.orders-bar {
    background: #26384f
}

.quantity-bar {
    background: #5aa469
}

.bar-label {
    font-size: 12px;
    margin-top: 8px;
    white-space: nowrap;
    color: #566273
}

.chart-legend {
    margin-top: 12px;
    color: #566273
}

.chart-legend span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin: 0 5px 0 14px;
    vertical-align: -1px
}

.chart-legend span:first-child {
    margin-left: 0
}

.orders-key {
    background: #26384f
}

.quantity-key {
    background: #5aa469
}

.login {
    max-width: 360px;
    margin: 60px auto
}

.login label {
    display: block;
    margin: 10px 0
}

.login input {
    width: 100%
}

.bond-sheet {
    width: 6in;
    height: 6in;
    background: white;
    border: 1px solid black;
    display: grid;
    grid-template-columns:.62in 1fr;
    grid-template-rows:repeat(4, 1fr);
    font-family: Arial, sans-serif
}

.bond-sheet.short {
    height: 3in
}

.bond-sheet .label {
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: bold;
    font-size: 13px
}

.bond-sheet .value {
    border-bottom: 1px solid black;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px
}

.bond-sheet .red {
    color: red
}

.bond-sheet .cases {
    font-size: 60px
}

@media print {
    .topbar, .no-print {
        display: none
    }

    main {
        padding: 0
    }

    .card {
        box-shadow: none;
        border: 0
    }

    .bond-sheet {
        page-break-after: always
    }
}

.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center
}

.icon-button {
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 1px solid #9aa8ba;
    border-radius: 4px;
    background: #fff;
    color: #26384f;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.icon-button:hover {
    background: #edf1f7
}

.icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor
}

.autocomplete-wrapper {
    position: relative;
    display: block
}

.autocomplete-wrapper input[type=text]{
    width: 100%;
    box-sizing: border-box
}

.autocomplete-items {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #d8dee9;
    border-top: 0;
    background: white;
    box-shadow: 0 3px 8px #0002;
    max-height: 240px;
    overflow-y: auto
}

.autocomplete-items div {
    padding: 8px;
    cursor: pointer
}

.autocomplete-items div:hover, .autocomplete-active {
    background: #edf1f7
}

.form-grid .checkbox-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    font-weight: bold
}

.checkbox-label input[type=checkbox] {
    margin: 0
}

.permissions-fieldset {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    align-items: center;
    border: 1px solid #d8dee9;
    border-radius: 6px;
    padding: 10px 12px
}

.permissions-fieldset legend {
    font-weight: bold;
    padding: 0 4px
}

.dashboard-grid {
    display: grid;
    grid-template-columns:minmax(280px, max-content) minmax(0, fit-content(100%));
    gap: 18px;
    align-items: start;
    overflow-x: auto
}

.dashboard-grid .section-heading {
    min-height: 34px
}

.dashboard-orders-card {
    min-width: 280px
}

.dashboard-expiring-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box
}

.dashboard-table-wrap {
    max-width: 100%;
    overflow-x: auto
}

.dashboard-table-wrap table {
    width: max-content;
    min-width: 100%
}

.dashboard-table-wrap th, .dashboard-table-wrap td {
    white-space: nowrap
}

.clickable-row, .clickable-row td {
    cursor: pointer
}

.clickable-row:hover {
    filter: brightness(.96)
}
