/* DAY ERP shared visual hierarchy. */
:root{
 --day-shell-navy:#102c44;--day-shell-navy-hover:#1c3d5a;
 --day-title-size:24px;--day-dialog-title-size:20px;--day-section-size:16px;--day-summary-size:22px;
 --day-body-size:14px;--day-input-size:15px;--day-label-size:13px;--day-meta-size:12px;
 --day-control-height:40px;--day-icon-size:36px;--day-radius:12px;
 --module-text:#24364c;--day-text-muted:#52647c;--module-muted:var(--day-text-muted);
 --module-bg:#f2f5fa;--module-panel:#fff;--module-soft:#eef3fa;
 --module-line:#d6e0ed;--module-line-strong:#8192ab;
 --day-field-fill:#fbfcff;
 --day-positive-ink:#23543b;--day-positive-fill:#e8f4ec;
 --day-attention-ink:#714913;--day-attention-fill:#fff3d7;
 --day-negative-ink:#8f2642;--day-negative-fill:#fcebf0;
 --day-info-ink:#234e83;--day-info-fill:#eaf2ff;
 --day-value-ink:#653c95;--day-value-fill:#f3ecfa;
 --day-surface-shadow:0 3px 14px #18345108;
}
/* Navigation has its own surfaces; it is never classified as a form action. */
#appSection.day-connected-shell .erp-header{background:var(--day-shell-navy);color:#f8fbff;border-bottom-color:#29445e;box-shadow:0 2px 12px #102c441c}
#appSection.day-connected-shell .erp-header .header-brand strong{color:#fff;font-size:16px}
#appSection.day-connected-shell .erp-header :is(.header-brand small,.header-center small){color:#d6e4f2;opacity:1}
#appSection.day-connected-shell .erp-header .header-logo{background:#fff;border-radius:10px}
#appSection.day-connected-shell .erp-header button{background:#1c3d5a;border-color:#58718b;color:#f6faff;border-radius:10px;box-shadow:none}
#appSection.day-connected-shell .erp-header button:hover{background:#2a4d6c;color:#fff}
#appSection.day-connected-shell .erp-header button:focus-visible{outline:2px solid #dceaff;outline-offset:3px}
#appSection.day-connected-shell .erp-header .header-center{background:#1c3d5a;color:#fff}
#appSection.day-connected-shell .erp-sidebar{background:#fff;border-inline-end-color:#dce4ef;padding:14px 10px;box-shadow:-2px 0 14px #102c4405}
#appSection.day-connected-shell :is(.sidebar-top-label,.sidebar-version){color:#52647c}
#appSection.day-connected-shell :is(.sidebar-item,.module-sidebar-module,.module-sidebar-item){--day-nav-ink:var(--module-color,var(--day-module-accent));border-radius:10px;font-size:14px;line-height:1.6;min-height:42px;padding:6px 10px;color:#354b65}
#appSection.day-connected-shell :is(.sidebar-item,.module-sidebar-module,.module-sidebar-item):is(:hover,:focus-visible){background:color-mix(in srgb,var(--day-nav-ink) 8%,#fff)!important;color:var(--day-nav-ink)}
#appSection.day-connected-shell :is(.sidebar-item,.module-sidebar-module).active{background:var(--day-nav-ink)!important;color:#fff!important;box-shadow:0 3px 10px #102c441a}
#appSection.day-connected-shell .module-sidebar-item.active{background:var(--day-module-soft)!important;color:var(--day-module-accent)!important;box-shadow:inset -3px 0 var(--day-module-accent)}
#appSection.day-connected-shell :is(.sidebar-item,.module-sidebar-module).active :is(b,.sidebar-icon,.module-sidebar-module-icon){color:#fff!important}
#appSection.day-connected-shell :is(.sidebar-item,.module-sidebar-module).active:focus-visible{outline-color:#fff;outline-offset:-4px}
#appSection.day-connected-shell :is(.sidebar-item,.module-sidebar-module):not(.active) :is(.sidebar-icon,.module-sidebar-module-icon){border-radius:8px;background:color-mix(in srgb,var(--day-nav-ink) 11%,#fff)!important;color:var(--day-nav-ink)}
#appSection.day-connected-shell :is(.sidebar-icon,.module-sidebar-module-icon) svg{width:19px;height:19px}
#appSection.day-connected-shell .module-sidebar-module b{font-size:14px}
#appSection.day-connected-shell .module-menu-children{border-inline-start-color:#dce4ef}
#appSection.day-connected-shell .erp-workspace{background:var(--module-bg);padding:14px 22px 24px}
.erp-workspace :is(.day-tab-group,.day-tab-item){font-family:var(--day-font,Vazir,sans-serif);border-radius:9px 9px 0 0}
.erp-workspace .day-workspace-tabs .day-tab-module{font-size:14px}
.erp-workspace .day-workspace-tabs .day-tab-item [role=tab]{font-size:13px}
/* Full available width for operational content, with no decorative viewport-height panels. */
.erp-workspace :is(.module-shell,.hr-shell,.crm-shell,.module-body){min-width:0;max-width:none}
.erp-workspace :is(.module-shell,.hr-shell){font-size:var(--day-body-size);line-height:1.75}
.erp-workspace :is(.module-head,.page-title,.projects-head,.users-toolbar,.mail-page-head){padding:8px 14px 9px;gap:12px;margin-bottom:8px;min-height:0;border-bottom-color:var(--module-line)}
.erp-workspace :is(.module-shell,.hr-shell,.crm-shell)>.module-head{margin-bottom:0}
.erp-workspace :is(.module-head,.page-title,.projects-head,.users-toolbar,.mail-page-head) h1{font-size:var(--day-title-size);line-height:1.45;letter-spacing:0;color:var(--day-module-accent);margin-block:0;overflow-wrap:anywhere}
.erp-workspace :is(.module-head,.page-title,.projects-head,.users-toolbar,.mail-page-head) :is(h1>svg,h1>.day-symbol){color:inherit}
.erp-workspace :is(.module-head,.page-title)>p,
.erp-workspace :is(.module-head,.page-title)>div>p{margin-block:3px 0;color:var(--day-text-muted);font-size:var(--day-meta-size);line-height:1.65}
.erp-workspace :is(.module-toolbar,.catalog-toolbar,.workflow-toolbar){display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:8px 14px;border-radius:12px}
.erp-workspace :is(.module-toolbar,.catalog-toolbar,.workflow-toolbar):has(:is(input,select,.day-select)){background:color-mix(in srgb,var(--day-module-accent) 5%,#fff);border:1px solid var(--module-line)}
.erp-workspace :is(h2,h3,h4).day-section-head,
.erp-workspace .day-section-head>:is(h2,h3,h4,b,strong){font-size:var(--day-section-size);color:var(--day-module-accent);line-height:1.5;margin-block:0;min-width:0;overflow-wrap:anywhere}
.erp-workspace .module-split:not([data-day-panel-grid="fixed"]){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,600px),1fr));gap:16px;align-items:start;background:transparent;border:0;padding:0;box-shadow:none;min-width:0}
.erp-workspace .module-split>*{min-width:0}
.erp-workspace .module-split>.module-card{margin:0}
[data-day-single-panel="true"]{grid-template-columns:minmax(0,1fr)!important}
[data-day-single-panel="true"]>:not([hidden]):not(.day-card-pruned):not(.day-card-container-pruned){grid-column:1/-1!important;min-width:0;max-width:100%;box-sizing:border-box}
.erp-workspace .module-card{background:var(--module-panel);border:1px solid var(--module-line);border-radius:14px;padding:14px;box-shadow:var(--day-surface-shadow);min-width:0;width:auto;box-sizing:border-box}
.erp-workspace .module-card>h2{font-size:var(--day-section-size);font-weight:700;line-height:1.55;color:var(--day-module-accent);margin:0 0 8px}
.erp-workspace .module-card>header{min-width:0}
.erp-workspace :is(.module-summary-grid,.module-stat-grid){display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px;border:0;background:transparent;margin-block:0 12px}
.erp-workspace [data-day-tone=value]{--day-metric-ink:var(--day-value-ink);--day-metric-fill:var(--day-value-fill)}
.erp-workspace [data-day-tone=positive]{--day-metric-ink:var(--day-positive-ink);--day-metric-fill:var(--day-positive-fill)}
.erp-workspace [data-day-tone=attention]{--day-metric-ink:var(--day-attention-ink);--day-metric-fill:var(--day-attention-fill)}
.erp-workspace :is(.module-summary-grid>div,.module-stat-grid>div,.module-stat-grid>.module-stat),
#appSection .erp-workspace .module-stat-grid>button.module-stat.day-action-control,
#page-crm .crm-summary>div:not(.crm-current-query){
 min-width:0;border:1px solid var(--module-line);border-block-start:3px solid var(--day-metric-ink,var(--day-module-accent));
 border-radius:12px;background:var(--day-metric-fill,var(--day-module-soft));padding:8px 12px;box-shadow:none;
}
.erp-workspace :is(.module-summary-grid,.module-stat-grid)>div:last-child{border-inline-end:1px solid var(--module-line)}
.erp-workspace :is(.module-summary-grid,.module-stat-grid)>:is(div,.module-stat)>:is(span,small),
#page-crm .crm-summary>div:not(.crm-current-query)>span{font-size:var(--day-meta-size);line-height:1.65;color:var(--day-text-muted)}
.erp-workspace :is(.module-summary-grid,.module-stat-grid)>:is(div,.module-stat)>:is(b,strong),
#page-crm .crm-summary>div:not(.crm-current-query)>b{
 font-size:var(--day-summary-size);font-weight:700;line-height:1.45;white-space:normal;overflow-wrap:anywhere;color:var(--day-metric-ink,var(--day-module-accent));
}
#appSection .erp-workspace .module-stat-grid>button.module-stat.day-action-control{display:grid;gap:2px;justify-items:start;text-align:start}
#appSection .erp-workspace .module-stat-grid>button.module-stat.day-action-control>span{font-size:var(--day-meta-size)!important;color:var(--day-text-muted)!important}
#appSection .erp-workspace .module-stat-grid>button.module-stat.day-action-control:hover:not(:disabled){border-color:var(--day-metric-ink,var(--day-module-accent))}
#page-crm .crm-summary{gap:8px}
#page-crm .crm-summary>div:not(.crm-current-query){display:grid;gap:2px;flex:1 1 132px}
.erp-workspace :is(.module-empty-state,.projects-empty-state){min-height:0;padding:12px 14px;font-size:var(--day-body-size);color:var(--day-text-muted)}
/* A single readable table surface; main descriptions retain a useful share of its width. */
.erp-workspace :is(.module-table-wrap,.catalog-table-wrap){border:1px solid #d6e0ed;border-radius:12px;background:#fff;box-shadow:none;max-width:100%;min-width:0;scrollbar-width:thin}
.erp-workspace .module-card>.module-table-wrap{border-color:#e0e7f1}
.erp-workspace .module-table{font-size:var(--day-body-size)}
.erp-workspace .module-table th{font-size:var(--day-label-size);font-weight:700;line-height:1.6;padding:9px 12px;background:var(--day-module-soft);color:var(--day-module-accent);text-align:center;vertical-align:middle}
.erp-workspace .module-table td{font-size:var(--day-body-size);font-weight:400;line-height:1.7;padding:8px 12px;border-bottom-color:#e4eaf2;vertical-align:middle}
.erp-workspace .module-table td :is(b,strong){font-size:inherit}
.erp-workspace .module-table td small{font-size:var(--day-meta-size);color:var(--day-text-muted)}
.erp-workspace .module-status{font-size:var(--day-meta-size);font-weight:600;line-height:1.5;min-height:26px;padding:3px 9px;border-radius:999px}
.erp-workspace :is(.module-status[data-status]:is([data-status=completed],[data-status=received],[data-status=posted],[data-status=approved],[data-status=published],[data-status=won],[data-status=resolved]),[data-module-message][data-kind=ok]){background:var(--day-positive-fill);color:var(--day-positive-ink)}
.erp-workspace :is(.module-status[data-status]:is([data-status=pending],[data-status=pending_finance],[data-status=pending_ceo_approval],[data-status=quotes_ready],[data-status=service_pending],[data-status=needs_correction],[data-status=waiting],[data-status=pending_approval],[data-status=partially_received]),[data-module-message][data-kind=warning]){background:var(--day-attention-fill);color:var(--day-attention-ink)}
.erp-workspace :is(.module-status[data-status]:is([data-status=rejected],[data-status=returned],[data-status=returned_to_supply],[data-status=reversed],[data-status=failed],[data-status=lost]),[data-module-message][data-kind=error]){background:var(--day-negative-fill);color:var(--day-negative-ink)}
.erp-workspace .module-status[data-status]:is([data-status=active],[data-status=accepted],[data-status=open],[data-status=processing],[data-status=submitted],[data-status=in_progress],[data-status=assigned]){background:var(--day-info-fill);color:var(--day-info-ink)}
.erp-workspace .module-table tbody tr:nth-child(even){background:#fbfcff}
.erp-workspace .module-table tbody tr:hover{background:#f0f5fd}
.erp-workspace .module-table td.table-description{color:#24364c;word-break:normal;overflow-wrap:break-word}
/* Rounded, clearly bounded controls. Explicit dense line editors keep their column geometry. */
#appSection .day-action-control{border-width:1px;border-radius:10px;min-height:38px;padding:7px 12px;font-size:var(--day-label-size);line-height:1.55;box-shadow:0 1px 3px #17345c0a}
#appSection .day-action-control.secondary-action:not(.primary-action,.day-danger-control){background:#fff;color:var(--day-module-accent)}
#appSection .day-action-control.secondary-action:not(.primary-action,.day-danger-control):hover:not(:disabled){background:var(--day-module-soft)}
#appSection .day-action-control.day-icon-control{padding:0}
#appSection .day-action-control:focus-visible{outline-width:2px;outline-offset:3px}
#appSection .day-action-control:disabled{opacity:.6;box-shadow:none}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.module-form-grid,.day-compact-form,.inventory-operation-fields)>label{font-family:var(--day-font,Vazir,sans-serif);font-size:var(--day-label-size);font-weight:600;line-height:1.6;color:#354b65;min-width:0}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.module-form-grid,.day-compact-form,.inventory-operation-fields)>label>span{font-size:inherit;font-weight:inherit;color:inherit}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.module-form-grid,.inventory-operation-fields)>label>input:not([type=checkbox]):not([type=radio]):not([type=hidden]){height:40px;font-size:var(--day-input-size);font-weight:400;border:1px solid var(--module-line-strong)!important;border-radius:10px;background:var(--day-field-fill);color:var(--module-text);padding:8px 10px;line-height:1.5;box-shadow:none;box-sizing:border-box}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.module-form-grid,.inventory-operation-fields)>label>textarea{font-size:var(--day-input-size);font-weight:400;line-height:1.8;min-height:68px;padding:8px 10px;border:1px solid var(--module-line-strong)!important;border-radius:10px;background:var(--day-field-fill);color:var(--module-text);box-shadow:none;box-sizing:border-box}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-select>.day-select-button{min-height:40px;padding:8px 10px;font-size:var(--day-input-size);line-height:1.5;border:1px solid var(--module-line-strong)!important;border-radius:10px;background:var(--day-field-fill);color:var(--module-text)}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.day-date-control,.day-money-display){border-width:1px!important;border-color:#8192ab!important;border-radius:10px;background:#fff;box-shadow:none}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-date-control{grid-template-columns:minmax(0,1fr) 40px;min-height:40px;max-width:100%;box-sizing:border-box}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-date-text{font-size:15px;font-weight:400;line-height:1.5;min-width:0;padding-block:8px}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-date-open{width:40px;min-width:40px;min-height:40px;border-radius:0;background:#eef3fa;color:#2f517e}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.module-form-grid,.inventory-operation-fields)>label>:is(input,textarea):focus-visible{outline:2px solid var(--day-module-accent);outline-offset:2px;border-color:var(--day-module-accent)!important}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) input::placeholder{color:#52647c;opacity:1}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) input[type=file]{padding:6px;border:1px solid #8192ab;border-radius:10px;font-size:14px;background:#fff;color:#52647c}
:is(.erp-workspace,.day-action-panel,dialog.module-editor) input[type=file]::file-selector-button{border:0;border-radius:7px;background:#eaf0fa;color:#21477b;font:inherit;font-weight:600;padding:7px 12px;margin-inline-end:10px;cursor:pointer}
.erp-workspace .day-workspace-record-scroll{border:1px solid #d6e0ed;border-top:3px solid var(--day-module-accent,#a3204f);border-radius:14px;background:#fff;box-shadow:var(--day-surface-shadow)}
.erp-workspace .day-workspace-record-scroll :is(.module-editor,.inventory-embedded){border-radius:0;background:#fff}
.erp-workspace :is(.module-editor>header,.inventory-embedded>form>header){border-radius:10px 10px 0 0;background:var(--day-module-soft);border-bottom-color:var(--module-line);padding:8px 14px!important}
.erp-workspace :is(.module-editor>header,.inventory-embedded>form>header) h3{font-size:var(--day-dialog-title-size)!important;color:var(--day-module-accent)}
.erp-workspace :is(.module-editor>header,.inventory-embedded>form>header) p{font-size:var(--day-meta-size)!important;line-height:1.65;color:var(--day-text-muted)!important}
.erp-workspace :is(.module-editor>footer,.inventory-embedded>form>footer){gap:12px;padding-top:10px}
.day-action-panel{border-radius:14px;border-color:#d6e0ed}
.day-action-panel>header{background:var(--day-module-soft);color:var(--day-module-accent);border-bottom-color:var(--module-line)}
.day-action-panel>header h3{font-size:var(--day-dialog-title-size)}
.day-confirm-dialog{border-radius:14px;border-color:#d6e0ed;box-shadow:0 18px 64px #102c442b}
.day-confirm-dialog h2{font-size:18px}.day-confirm-dialog p{font-size:var(--day-body-size)}
#page-dashboard>.page-title{padding-block:10px 12px;gap:12px 18px}
.day-dashboard-workspaces{gap:12px;margin-block:12px}
.day-dashboard-workspaces>section{align-self:start;border:1px solid var(--module-line);border-block-start:3px solid var(--workspace-group-accent);border-radius:14px;background:#fff;padding:8px}
.day-dashboard-workspaces>section>h2{font-size:var(--day-section-size);color:var(--workspace-group-accent);margin:0 0 4px;padding-inline:10px}
#page-dashboard .day-dashboard-workspaces>section:first-child>h2::after{display:none}
.day-dashboard-module{min-height:46px;padding:6px 10px;border-radius:9px}
.day-dashboard-module>svg:not(.day-launcher-arrow){width:19px;height:19px;padding:6px;border-radius:8px;background:color-mix(in srgb,var(--launcher-accent) 12%,#fff)}
.day-dashboard-module:is(:hover,:focus-visible){background:color-mix(in srgb,var(--launcher-accent) 5%,#fff)}
@media(max-width:980px){#appSection.day-connected-shell .erp-workspace{padding-inline:16px}.erp-workspace .module-card{padding:14px}}
@media(max-width:760px){
 #appSection.day-connected-shell .erp-workspace{padding:10px 12px 18px}
 .erp-workspace :is(.module-head,.page-title,.projects-head,.users-toolbar,.mail-page-head,.module-toolbar,.catalog-toolbar,.workflow-toolbar){padding-inline:12px;gap:12px}
 .erp-workspace :is(.module-head,.page-title,.projects-head,.users-toolbar,.mail-page-head) h1{font-size:21px}
 .erp-workspace .module-card{padding:12px;border-radius:12px}
 .erp-workspace .module-split{grid-template-columns:minmax(0,1fr);gap:12px}
 .erp-workspace .module-table :is(th,td){padding:9px 10px}
 #appSection .day-action-control{min-height:44px}
 #appSection .day-action-control.day-icon-control{--day-icon-size:44px}
 :is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.module-form-grid,.inventory-operation-fields)>label>input:not([type=checkbox]):not([type=radio]):not([type=hidden]),
 :is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-select>.day-select-button{min-height:44px;font-size:16px}
 :is(.erp-workspace,.day-action-panel,dialog.module-editor) :is(.module-form-grid,.inventory-operation-fields)>label>textarea{font-size:16px}
 :is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-date-control{grid-template-columns:minmax(0,1fr) 44px;min-height:44px}
 :is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-date-open{width:44px;min-width:44px;min-height:44px}
 :is(.erp-workspace,.day-action-panel,dialog.module-editor) .day-date-text{font-size:16px}
}

.module-editor details:not(.contract-section):not(.learning-disclosure)>summary{cursor:pointer;border:1px solid #bdcce1;border-radius:10px;background:#edf2fc;color:#1b3e72;padding:11px 14px;font-size:15px;font-weight:700;min-height:44px;box-sizing:border-box}
.module-editor details:not(.contract-section):not(.learning-disclosure)>summary:hover{background:#e1e9fb}
.module-editor details:not(.contract-section):not(.learning-disclosure)>summary:focus-visible{outline:3px solid #315bc8;outline-offset:2px}
.module-editor details:not(.contract-section):not(.learning-disclosure)[open]>summary{margin-bottom:12px;border-color:#315bc8}
