/* Classic (desktop) layout: the look of the legacy WinForms back office (System/frmMain + MainModule.SetTheme2).
   Everything is scoped under .nms-classic, which MainLayout puts around the page, popovers and dialogs. */

.nms-classic { --cl-face: #f0f0f0; --cl-form: #f4f7fc; --cl-desk: #d7e4f2; --cl-border: #a0a0a0; --cl-dark: #696969;
               --cl-btn: #596a8d; --cl-btn-dark: #3f4d68; --cl-sel: #cce8ff; --cl-sel-border: #99d1ff; --cl-head: #f0f0f0;
               font-family: Tahoma, "Microsoft Sans Serif", "Segoe UI", sans-serif; font-size: 13px; color: #000; }

/* ---- shell: menu strip, picture-button panel, client area, status strip ---- */
.nms-classic .cl-shell { display: flex; flex-direction: column; min-height: 100vh; background: var(--cl-desk); }
.nms-classic .cl-menubar { display: flex; align-items: center; flex-wrap: wrap; background: var(--cl-face); border-bottom: 1px solid #d7d7d7;
                           padding: 1px 2px; position: sticky; top: 0; z-index: 1100; }
.nms-classic .cl-menu .mud-button-root,
.nms-classic .cl-menu-button { font: 13px Tahoma, "Microsoft Sans Serif", "Segoe UI", sans-serif; color: #000; text-transform: none; padding: 2px 8px;
                               min-width: 0; border: 1px solid transparent; border-radius: 0; background: none; cursor: default; line-height: 18px; letter-spacing: 0; font-weight: 400; }
.nms-classic .cl-menu .mud-button-root:hover,
.nms-classic .cl-menu-button:hover { background: var(--cl-sel); border-color: var(--cl-sel-border); }
.nms-classic .cl-menu .mud-button-label { font-weight: 400; }
.nms-classic .cl-exit { display: inline; margin: 0; }
.nms-classic .cl-spacer { flex: 1 1 auto; }
.nms-classic .cl-menu-popover { border: 1px solid #979797; box-shadow: 2px 2px 3px rgba(0, 0, 0, .25) !important; border-radius: 0 !important; background: #f2f2f2; }
.nms-classic .cl-menu-list { padding: 2px 0 !important; overflow-x: hidden; }
.nms-classic .cl-menu-popover, .nms-classic .cl-menu-popover .mud-list { overflow-x: hidden !important; }
.nms-classic .cl-menu-popover .mud-menu-item { min-height: 0; padding: 3px 24px 3px 28px; font: 13px Tahoma, "Microsoft Sans Serif", "Segoe UI", sans-serif; }
.nms-classic .cl-menu-popover .mud-menu-item:hover { background: var(--cl-sel); outline: 1px solid var(--cl-sel-border); outline-offset: -1px; }
.nms-classic .cl-menu-popover .mud-menu-item-text { font-size: 13px; }
.nms-classic .cl-menu-sep { margin: 3px 2px 3px 26px; border-color: #d7d7d7; }

.nms-classic .cl-toolbar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 0 4px 0; }
.nms-classic .cl-tools { display: flex; gap: 4px; border: 1px solid var(--cl-dark); background: var(--cl-desk); padding: 4px 6px 2px; }
.nms-classic .cl-tool-form { margin: 0; display: contents; }
.nms-classic .cl-tool { display: flex; flex-direction: column; align-items: center; width: 82px; text-decoration: none; color: #000; background: none;
                        border: none; padding: 0; cursor: pointer; font: 700 11px "Microsoft Sans Serif", Tahoma, sans-serif; }
.nms-classic .cl-tool img { width: 64px; height: 64px; object-fit: contain; padding: 4px; background: var(--cl-face);
                            border: 1px solid; border-color: #fff #696969 #696969 #fff; box-sizing: content-box; }
.nms-classic .cl-tool:hover img { background: #e5f1fb; border-color: #0078d7; }
.nms-classic .cl-tool:active img { border-color: #696969 #fff #fff #696969; }
.nms-classic .cl-tool span { padding: 2px 0; }
.nms-classic .cl-banner { flex: 1 1 400px; align-self: flex-start; margin-top: 6px; background: #ff0; color: #f00; border: 1px solid #000;
                          font: 700 26px "Microsoft Sans Serif", Arial, sans-serif; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nms-classic .cl-client { flex: 1 1 auto; padding: 8px; }
.nms-classic .cl-client > * { max-width: 1800px; }
.nms-classic .cl-status { display: flex; gap: 0; background: var(--cl-face); border-top: 1px solid #d7d7d7; font-size: 12px; position: sticky; bottom: 0; z-index: 1000; }
.nms-classic .cl-status > span { padding: 2px 10px; border-right: 1px solid #c8c8c8; }
.nms-classic .cl-status > .cl-spacer { border-right: 1px solid #c8c8c8; }

/* ---- forms: square, grey, bordered ---- */
.nms-classic .mud-paper { border-radius: 0 !important; }
.nms-classic .mud-paper-outlined { border: 1px solid var(--cl-border) !important; background: var(--cl-form); }
.nms-classic .mud-elevation-1, .nms-classic .mud-elevation-2 { box-shadow: none; border: 1px solid var(--cl-border); }
.nms-classic h1.mud-typography-h5 { font-family: Verdana, Tahoma, sans-serif; }

/* Buttons: filled = legacy RGB(89,106,141) white text; outlined/text = the Windows button face. */
.nms-classic .mud-button-root { border-radius: 0 !important; letter-spacing: 0; }
.nms-classic .mud-button-filled { box-shadow: none !important; border: 1px solid var(--cl-btn-dark); }
.nms-classic .mud-button-filled.mud-button-filled-primary { background: var(--cl-btn); color: #fff; }
.nms-classic .mud-button-filled.mud-button-filled-primary:hover { background: #4b5b7c; }
.nms-classic .mud-button-outlined, .nms-classic .mud-dialog-actions .mud-button-text { background: #e1e1e1; border: 1px solid #adadad !important; color: #000 !important; }
.nms-classic .mud-button-outlined:hover, .nms-classic .mud-dialog-actions .mud-button-text:hover { background: #e5f1fb; border-color: #0078d7 !important; }
.nms-classic .mud-button-filled:disabled, .nms-classic .mud-button-outlined:disabled { background: #cccccc !important; color: #838383 !important; border-color: #bfbfbf !important; }

/* Inputs: white boxes with a thin grey border. */
.nms-classic .mud-input.mud-input-outlined { background: #fff; }
.nms-classic .mud-input-outlined-border { border-radius: 0 !important; border-color: #7a7a7a !important; }
.nms-classic .mud-input.mud-input-outlined:focus-within .mud-input-outlined-border { border-color: #0078d7 !important; border-width: 1px !important; }
.nms-classic .mud-input-label { font-family: Verdana, Tahoma, sans-serif; font-weight: 700; font-size: 12px; }
.nms-classic .mud-input-slot { font-size: 13px; }

/* Grids: DataGridView look - header face, cell lines, blue selection. */
.nms-classic .mud-table, .nms-classic .mud-simple-table { border-radius: 0 !important; }
.nms-classic .mud-table-outlined, .nms-classic .mud-simple-table.mud-table-outlined { border: 1px solid var(--cl-dark) !important; }
.nms-classic .mud-table-container { background: #fff; }
.nms-classic .mud-table-head .mud-table-cell, .nms-classic .mud-simple-table thead th {
    background: var(--cl-head) !important; color: #000; font-weight: 400; border-right: 1px solid #d5d5d5; border-bottom: 1px solid #a0a0a0; padding: 3px 6px; }
.nms-classic .mud-table-body .mud-table-cell, .nms-classic .mud-simple-table tbody td {
    border-right: 1px solid #e3e3e3; border-bottom: 1px solid #e3e3e3; padding: 2px 6px; font-size: 13px; }
.nms-classic .mud-table-dense .mud-table-row .mud-table-cell { padding: 2px 6px; }
.nms-classic .mud-table-body .mud-table-row:hover .mud-table-cell { background: var(--cl-sel); }
.nms-classic .mud-table-body .mud-selected-item .mud-table-cell, .nms-classic .mud-table-body .mud-table-row.mud-selected-item { background: #0078d7 !important; color: #fff !important; }
.nms-classic .mud-table-pagination { background: var(--cl-face); border-top: 1px solid var(--cl-border); }
.nms-classic .nms-report th { background: var(--cl-head); font-weight: 400; border-right: 1px solid #d5d5d5; border-bottom: 1px solid #a0a0a0; }
.nms-classic .nms-report td { border-right: 1px solid #e3e3e3; }
.nms-classic .nms-report-wrap { border-radius: 0; border: 1px solid var(--cl-dark); }

/* Dialogs: a window with a caption bar. */
.nms-classic .mud-dialog { border-radius: 0 !important; border: 1px solid #555; box-shadow: 4px 4px 10px rgba(0, 0, 0, .35) !important; background: var(--cl-form); }
.nms-classic .mud-dialog-title { background: #596a8d; color: #fff; padding: 6px 12px; }
.nms-classic .mud-dialog-title .mud-typography { color: #fff; font-family: Verdana, Tahoma, sans-serif; font-size: 13px; font-weight: 700; }
.nms-classic .mud-dialog-title .mud-button-close { color: #fff; }
.nms-classic .mud-dialog-actions { background: var(--cl-face); border-top: 1px solid #d7d7d7; }

/* Chips, tabs and alerts: flat. */
.nms-classic .mud-chip { border-radius: 2px; }
.nms-classic .mud-alert { border-radius: 0; border: 1px solid currentColor; }
.nms-classic .mud-tabs-toolbar { background: var(--cl-face); border-bottom: 1px solid var(--cl-border); }
.nms-classic .mud-tab.mud-tab-active { background: var(--cl-form); border: 1px solid var(--cl-border); border-bottom-color: var(--cl-form); }
.nms-classic .mud-snackbar { border-radius: 0; }

@media (max-width: 700px) {
    .nms-classic .cl-banner { font-size: 16px; flex-basis: 100%; }
    .nms-classic .cl-tool { width: 60px; }
    .nms-classic .cl-tool img { width: 40px; height: 40px; }
}

@media print {
    .nms-classic .cl-menubar, .nms-classic .cl-toolbar, .nms-classic .cl-status { display: none !important; }
    .nms-classic .cl-shell, .nms-classic .cl-client { background: #fff; padding: 0; }
}
