﻿:root { font-family: Arial, sans-serif; color: #243447; background: #f5f7fa; }
body { margin: 0; }
body:has(.archive-grid-loading), body:has(.archive-grid-loading) * { cursor: wait !important; }
.page-shell header { display: flex; align-items: center; gap: 2rem; padding: .8rem 1.5rem; background: #174f7c; }
.brand, nav a { color: white; text-decoration: none; }
.page-shell header > a, .user { color: white; }
.user { margin-left: auto; }
.brand { display: inline-flex; align-items: center; gap: .55rem; flex: 0 0 auto; font-size: 1.2rem; font-weight: 700; white-space: nowrap; }
.main-menu { display: flex; align-items: stretch; gap: .25rem; }
.main-menu a, .menu-link { display: block; padding: .55rem .7rem; color: white; background: transparent; border: 0; font: inherit; text-decoration: none; cursor: pointer; }
.main-menu a:hover, .menu-link:hover, .main-menu a.active { background: #ffffff22; }
.refresh-menu-button { display: inline-flex; align-items: center; justify-content: center; width: 38px; padding: .35rem .45rem; }
.refresh-menu-button img { display: block; width: 28px; height: 28px; }
.menu-dropdown { position: relative; }
.menu-dropdown-content { display: none; position: absolute; z-index: 1000; min-width: 190px; padding: .3rem; background: #174f7c; box-shadow: 0 8px 18px #0003; }
.menu-dropdown:hover .menu-dropdown-content, .menu-dropdown:focus-within .menu-dropdown-content { display: block; }
main { padding: 1.5rem; }
.message { margin-bottom: 1rem; padding: .75rem 1rem; border-radius: .25rem; }
.message.error { color: #842029; background: #f8d7da; }
.message.success { color: #0f5132; background: #d1e7dd; }
.settings-panel { margin-bottom: 1.5rem; padding: 1rem; background: white; border-radius: .4rem; }
.password-form { display: grid; grid-template-columns: 180px minmax(220px, 420px); gap: .75rem; align-items: center; }
.password-form .dxbl-btn { grid-column: 2; justify-self: start; }
.grid-actions { display: flex; gap: .75rem; margin-top: 1rem; }
.archive-toolbar { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; padding: 1rem; background: white; border-radius: .4rem; }
.archive-toolbar label { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.archive-toolbar .period-date-edit { width: 120px !important; min-width: 120px !important; max-width: 120px !important; flex: 0 0 80px; }
.archive-toolbar input { padding: .45rem; border: 1px solid #aebbc7; border-radius: .25rem; }
.print-link { display: inline-block; margin-right: .45rem; color: #174f7c; font-weight: 600; }
.report-viewer { height: calc(100vh - 115px); }
.action-link { display: inline-block; padding: .55rem .8rem; color: white; background: #174f7c; border-radius: .25rem; text-decoration: none; }
.popup-editor-fields { display: grid; grid-template-columns: repeat(2,minmax(220px,1fr)); gap: .8rem; margin-bottom: 1rem; }
.popup-editor-fields label { display: grid; gap: .3rem; }
.popup-rich-edit { width: 100%; height: 560px; }
.popup-message-text { min-height: 220px; padding: 1.25rem; white-space: pre-wrap; background: white; border: 1px solid #d7e0e7; border-radius: .4rem; font-size: 1rem; line-height: 1.55; }
.login-page { min-height: 100vh; display: grid; place-items: center; background: #eef3f7; }
.login-card { width: min(360px, calc(100% - 3rem)); padding: 2rem; background: white; border-radius: .5rem; box-shadow: 0 8px 30px #1a385522; }
.login-card form { display: grid; gap: .5rem; }
.login-card input { padding: .65rem; margin-bottom: .5rem; border: 1px solid #aebbc7; border-radius: .25rem; }
.login-card button { padding: .7rem; color: white; background: #174f7c; border: 0; border-radius: .25rem; cursor: pointer; }
.language-switch { display: flex; gap: .25rem; }
.language-switch a { padding: .35rem; color: white; text-decoration: none; border: 1px solid #ffffff55; border-radius: .2rem; }
.wide-edit-form { width: min(920px, 86vw); }
.wide-edit-form .dxbl-text-edit, .wide-edit-form .dxbl-memo-edit, .wide-edit-form input, .wide-edit-form textarea { width: 100%; min-width: 0; }
.dxbl-grid-edit-popup:has(.wide-edit-form), .dxbl-popup:has(.wide-edit-form) { width: min(980px, 94vw) !important; max-width: 94vw !important; }
.edit-form-actions { display: flex; justify-content: flex-end; gap: 12px; width: 100%; padding-top: 12px; }
.login-languages { margin-top: 1rem; text-align: center; }
.filter-panel { margin: 0 0 1rem; padding: .8rem 1rem; background: white; border: 1px solid #c8d1d9; border-radius: .35rem; }
.warehouse-options { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-bottom: .7rem; }
.mail-panels { display: grid; grid-template-columns: repeat(auto-fit,minmax(320px,1fr)); gap: 1rem; }
.mail-panels .filter-panel { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mail-options { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
.active-data-page { position: relative; }
.active-data-page > h1 { margin: 0 0 1.75rem; line-height: 1.15; color: #0b3157; font-size: 1.75rem; }
.active-data-page .mail-panels { gap: .55rem; }
.active-data-page .mail-panels .filter-panel { margin-bottom: .45rem; padding: .45rem .7rem; }
.active-data-page .warehouse-filter { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; margin-bottom: .4rem; padding: .35rem .7rem; }
.active-data-page .warehouse-filter legend { padding: 0 .25rem; }
.active-data-page .warehouse-options { display: flex; align-items: center; flex: 1; gap: .25rem .8rem; margin: 0; }
.active-data-page .archive-toolbar { margin-bottom: .35rem; padding: .5rem .7rem; gap: .65rem; }
.archive-export-top { position: absolute; top: 0; right: 0; }
.expedition-workspace { display: grid; grid-template-columns: minmax(520px, 1.4fr) minmax(360px, 1fr); gap: 1.25rem; margin-bottom: 1.25rem; }
.expedition-filter-card, .expedition-send-card { min-height: 118px; margin: 0; padding: .75rem 1.1rem; border-color: #d8e0e8; border-radius: 10px; box-shadow: 0 8px 22px #123a5a0c; }
.expedition-filter-card { display: flex; flex-direction: column; container-type: inline-size; }
.expedition-filter-card legend, .expedition-send-card legend { padding: 0; color: #5b6672; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.expedition-filter-content { display: flex; align-items: center; gap: 1.75rem; flex-wrap: wrap; }
.expedition-workspace:not(.orders-workspace) .delivery-filter-content { display: grid; grid-template-columns: max-content 120px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; align-content: start; column-gap: .5rem; row-gap: .5rem; }
.delivery-period-label { color: #0b3157; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.delivery-period-from-label { grid-column: 1; grid-row: 1; }
.delivery-period-to-label { grid-column: 1; grid-row: 2; }
.delivery-filter-content .delivery-date-from { grid-column: 2; grid-row: 1; }
.delivery-filter-content .delivery-date-to { grid-column: 2; grid-row: 2; }
.expedition-date-stack { display: grid; gap: .5rem; }
.expedition-date-stack > label { display: flex; align-items: center; justify-content: space-between; gap: .35rem; min-width: 135px; color: #0b3157; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.expedition-filter-content .period-date-edit { width: 120px !important; min-width: 120px !important; max-width: 120px !important; flex: 0 0 120px; }
.expedition-warehouses { display: flex; align-items: center; gap: .45rem; min-width: 300px; flex: 1; color: #0b3157; font-size: .85rem; font-weight: 600; }
.expedition-warehouses > span { flex: 0 0 auto; white-space: nowrap; }
.expedition-workspace:not(.orders-workspace) .expedition-warehouses { grid-column: 3; grid-row: 1 / 3; align-self: flex-start; align-items: flex-start; margin-left: 1.25rem; }
.expedition-workspace:not(.orders-workspace) .expedition-warehouses > span { padding-top: .45rem; }
.expedition-warehouses .warehouse-options { gap: .45rem; margin: 0; }
.warehouse-chip { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .75rem; background: white; border: 1px solid #cbd5df; border-radius: 999px; color: #2f4050; font-size: .82rem; font-weight: 400; white-space: nowrap; }
.expedition-filter-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .45rem; padding-top: 0; }
.expedition-inline-load-container { display: flex; grid-column: 4; grid-row: 2; align-self: center; justify-content: flex-end; margin-left: 1.25rem; }
.expedition-inline-load-button { white-space: nowrap; }
@container (max-width: 730px) {
  .delivery-filter-content .expedition-inline-load-container { grid-column: 1 / -1; grid-row: 3; margin-left: 0; }
}
.orders-workspace { margin-bottom: .45rem; }
.orders-workspace .expedition-filter-card,
.orders-workspace .expedition-send-card { min-height: 0; padding: .4rem .75rem .55rem; }
.orders-workspace .expedition-filter-content { align-items: center; gap: .45rem .8rem; }
.orders-workspace .expedition-date-stack { display: flex; align-items: center; gap: 1.1rem; }
.orders-workspace .expedition-date-stack > label { display: flex; align-items: center; min-width: 0; gap: .3rem; }
.orders-workspace .expedition-filter-content .period-date-edit { width: 120px !important; min-width: 120px !important; max-width: 120px !important; flex: 0 0 120px; }
.orders-workspace .orders-load-button { align-self: center; white-space: nowrap; }
.orders-workspace .expedition-warehouses { display: flex; align-items: center; min-width: 220px; gap: .4rem; }
.orders-workspace .expedition-warehouses .warehouse-options { flex-wrap: nowrap; }
.orders-workspace .warehouse-chip { padding: .25rem .55rem; }
.orders-workspace .expedition-send-card { gap: .3rem; }
.orders-workspace .expedition-send-row { min-height: 34px; }
.expedition-send-card { display: grid; gap: .55rem; align-content: start; }
.expedition-send-row { display: grid; grid-template-columns: minmax(180px,1fr) 165px; align-items: center; gap: 1rem; }
.expedition-send-row > span { color: #1b2836; font-size: .9rem; font-weight: 600; }
.expedition-send-row .dxbl-btn { justify-self: stretch; }
.expedition-send-row .expedition-send-action { width: 165px; box-sizing: border-box; }
.expedition-send-row span.expedition-send-action { display: block; }
.expedition-send-row span.expedition-send-action .dxbl-btn { width: 100%; }
.archive-grid-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; background: white; border: 1px solid #d8e0e8; border-bottom: 0; border-radius: 10px 10px 0 0; }
.archive-grid-header-left, .archive-grid-header-right { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.archive-grid-header-left { flex: 1 1 auto; min-width: 0; }
.archive-grid-header-right { justify-content: flex-end; margin-left: auto; }
.archive-grid-search { width: min(380px, 100%); }
.archive-grid-header + .dxbl-grid { border-top-left-radius: 0; border-top-right-radius: 0; }
.grid-filter-clear-button { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid #b8c3ce; border-radius: 4px; background: white; color: #5b6672; font-size: .95rem; line-height: 1; cursor: pointer; }
.grid-filter-clear-button:hover { color: #842029; border-color: #d08b94; background: #fff5f6; }
.delivery-date-filter-cell .dxbl-edit-btn-clear { display: none !important; }
.grid-detailed-filter-cell { display: grid; grid-template-columns: 38px minmax(70px, 1fr); align-items: center; gap: .25rem; }
.grid-detailed-boolean-filter-cell { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.grid-detailed-filter-cell .grid-filter-operator { min-width: 0; width: 38px; height: 28px; padding: 0 .15rem; border: 1px solid #b8c3ce; border-radius: 3px; background: white; color: #243447; font-size: .78rem; }
.grid-detailed-filter-cell .grid-filter-value { min-width: 0; width: 100%; height: 28px; padding: .2rem .35rem; border: 1px solid #b8c3ce; border-radius: 3px; box-sizing: border-box; font: inherit; }
.grid-detailed-filter-cell .grid-detailed-date-edit { min-width: 0; width: 100%; }
.grid-row-button.dxbl-btn { min-height: 22px; padding: .1rem .35rem; font-size: .75rem; line-height: 1.05; }
.grid-row-actions { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; }
.grid-row-actions > span { display: inline-flex; }
.grid-cell-center { display: flex; align-items: center; justify-content: center; width: 100%; }
.dxbl-grid {
  --dxbl-grid-font-family: Arial, sans-serif;
  --dxbl-grid-font-size: .75rem;
  --dxbl-grid-line-height: 1.375;
  --dxbl-grid-text-cell-padding-x: .25rem;
  --dxbl-grid-text-cell-padding-y: .1875rem;
  --dxbl-grid-editor-cell-padding-x: .25rem;
  --dxbl-grid-editor-cell-padding-y: .1875rem;
}
.dxbl-grid .dxbl-grid-table > thead .dxbl-grid-header-row > th:not(.dxbl-grid-empty-cell) {
  background-color: #dbeaf7 !important;
  color: #174f7c;
}
.dxbl-grid .dxbl-grid-table > tbody > tr > td {
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.dxbl-grid .dxbl-grid-table > tbody > tr:nth-child(even):not(.blocked-row):not(.dxbl-grid-selected-row):not(.dxbl-grid-focused-row):not(:hover) > td:not(.dxbl-grid-empty-cell) { background-color: #f7f8fa; }
.blocked-row > td { background-color: #ffd9d9 !important; color: #7b1111; }
.home-dashboard { min-height: calc(100vh - 110px); display: flex; flex-direction: column; font-family: Arial, Helvetica, sans-serif; }
.home-page-title { display: flex; align-items: center; gap: .55rem; margin: .55rem 0 3.5rem; color: #00529b; font-size: 1.55rem; line-height: 1.2; font-weight: 700; border: 0; outline: 0; box-shadow: none; }
.home-page-title:focus, .home-page-title:focus-visible, .home-page-title:active { border: 0; outline: 0; box-shadow: none; }
.home-page-title svg { width: 1.35rem; height: 1.35rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-dashboard-body { display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; max-width: 1220px; margin: 0 auto; padding: 0 1rem 2rem; }
.home-logo-panel { width: 290px; height: 210px; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: white; border: 1px solid #d7dce2; border-radius: 12px; box-sizing: border-box; }
.home-logo-panel img { display: block; width: 100%; max-width: 240px; height: auto; }
.home-tile-grid { display: grid; grid-template-columns: repeat(3, 220px); gap: 18px; }
.home-tile { min-height: 142px; display: block; padding: 20px; color: inherit; text-decoration: none; background: white; border: 1px solid #d7dce2; border-radius: 12px; box-sizing: border-box; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.home-tile:hover, .home-tile:focus-within { transform: translateY(-2px); border-color: #d9a400; box-shadow: 0 12px 26px #0f2f4c14; }
.home-tile-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; background: #fbf0d2; border-radius: 10px; }
.home-tile-icon svg { width: 24px; height: 24px; stroke: #7a5c00; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.home-tile-title { display: block; margin-bottom: 4px; color: #1a2530; font-size: 1rem; font-weight: 700; }
.home-tile-text { display: block; color: #5b6b7a; font-size: .82rem; line-height: 1.35; }
.home-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.home-chip { display: inline-block; padding: 4px 10px; color: #5b6b7a; font-size: .75rem; line-height: 1.2; text-decoration: none; border: 1px solid #d7dce2; border-radius: 20px; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.home-chip:hover, .home-chip:focus { color: white; background: #0f2f4c; border-color: #0f2f4c; }
.home-footer { margin-top: auto; padding: 1rem; color: #5b6b7a; font-size: .8rem; text-align: center; }
@media (max-width: 860px) {
  .archive-export-top { position: static; display: flex; justify-content: flex-end; margin: -.5rem 0 1rem; }
  .expedition-workspace { grid-template-columns: 1fr; }
  .expedition-send-row { grid-template-columns: 1fr; }
  .expedition-send-row .dxbl-btn { justify-self: start; }
  .home-tile-grid { grid-template-columns: repeat(2, minmax(210px, 1fr)); }
  .home-logo-panel { width: min(100%, 460px); }
}
@media (max-width: 560px) {
  .orders-workspace .expedition-date-stack { align-items: stretch; flex-direction: column; }
  .orders-workspace .expedition-date-stack > label { justify-content: space-between; }
  .orders-workspace .expedition-date-stack > label,
  .orders-workspace .expedition-filter-content .period-date-edit { width: 100% !important; min-width: 0 !important; max-width: none !important; flex-basis: auto; }
  .orders-workspace .orders-load-button { align-self: stretch; }
  .home-page-title { margin-bottom: 1.5rem; font-size: 1.3rem; }
  .home-dashboard-body { padding: 1rem; }
  .home-tile-grid { grid-template-columns: 1fr; width: 100%; }
}
.popup-actions { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; width: 100%; }
