.ei-shell { width: min(1400px, 96vw); }
.ei-layout { display: grid; grid-template-columns: 1fr 1.35fr; gap: 1rem; align-items: start; }
.ei-layout > * { min-width: 0; }
.ei-layout.totals-focus { grid-template-columns: 1fr; }
.ei-layout.totals-focus #setupPanelCard { display: none; }
.ei-card { min-width: 0; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(160deg, #fff 0%, #fefcf8 100%); box-shadow: var(--shadow); padding: 1rem; }
.ei-card h2 { margin: 0 0 .75rem; font-size: 1.03rem; }
.ei-card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 .2rem; }
.ei-card-head h2 { margin-bottom: 0; }
.ei-context-line { margin: 0 0 .75rem; color: #5f574e; font-size: .83rem; font-family: "IBM Plex Mono", monospace; }
.ei-field { margin-bottom: .75rem; }
.ei-field label { display: block; margin-bottom: .3rem; font-weight: 600; font-size: .88rem; }
.ei-field input, .ei-field select, .ei-field textarea, #importModeSelect { width: 100%; border-radius: 10px; border: 1px solid var(--border); background: #fdfcf8; color: #1f1f1f; font-family: "IBM Plex Mono", monospace; font-size: .86rem; padding: .52rem .58rem; }
.ei-field textarea { min-height: 95px; max-height: 300px; resize: vertical; }
.ei-field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .6rem; }
.ei-check-row { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; margin: .4rem 0 .2rem; }
.ei-check-row label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-size: .85rem; font-weight: 600; color: #4f483f; }
.mini-btn, .primary-btn { border-radius: 999px; border: 1px solid #b8ddcf; background: #e8f8f2; color: #105f49; padding: .4rem .75rem; font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.primary-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.text-link-btn { margin-top: .35rem; border: 0; background: transparent; color: var(--accent-deep); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: .12em; padding: 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: .45rem; margin: .45rem 0 .9rem; align-items: center; }
.status-text { margin: .55rem 0 0; color: #5f574e; font-size: .84rem; }
.summary-row { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0 0 .75rem; }
.summary-row p { margin: 0; color: #4f483f; font-size: .88rem; }
.table-wrap { max-width: 100%; overflow-x: auto; overflow-y: hidden; border: 1px solid #e5ddd1; border-radius: 12px; background: #fff; margin: 0 0 1rem; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 860px; }
.table-wrap th, .table-wrap td { padding: .48rem .55rem; border-bottom: 1px solid #efe7dc; text-align: left; font-size: .82rem; vertical-align: top; }
.table-wrap th { background: #faf6ef; color: #4f483f; font-weight: 700; }
.row-action-group { display: inline-flex; gap: .35rem; align-items: center; }
.row-edit { border: 1px solid #bfd6ef; background: #eef6ff; color: #1f4f86; border-radius: 999px; padding: .18rem .45rem; font: inherit; font-size: .72rem; cursor: pointer; }
.row-remove { border: 1px solid #e6c0bf; background: #fff4f4; color: #8a2f2b; border-radius: 999px; padding: .18rem .45rem; font: inherit; font-size: .72rem; cursor: pointer; }
.state-pill { display: inline-block; border-radius: 999px; padding: .12rem .46rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.state-locked { background: #ecf6ee; color: #0f6b41; border: 1px solid #bde0c8; }
.state-draft { background: #f2f4f7; color: #4e5a6a; border: 1px solid #d2dae5; }
.state-denied { background: #fff1f1; color: #922f2a; border: 1px solid #e6bfbe; }
.ei-modal-backdrop { position: fixed; inset: 0; background: rgba(14, 20, 28, 0.55); display: grid; place-items: center; padding: 1rem; z-index: 2200; overflow-y: auto; }
.ei-modal-backdrop[hidden] { display: none !important; }
.ei-modal-panel { width: min(560px, 94vw); max-height: min(90vh, 820px); overflow: auto; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(160deg, #fff 0%, #fefcf8 100%); box-shadow: var(--shadow); padding: 1rem; }
.ei-modal-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.ei-modal-head h2 { margin: 0; font-size: 1rem; }
@media (max-width: 1060px) { .ei-layout { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .ei-field-row { grid-template-columns: 1fr; }
  .table-wrap table { min-width: 720px; }
}
