:root {
  color: #18211e;
  background: #f3f5f4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-rows: 56px 1fr; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; color: #fff; background: #14342b; border-bottom: 1px solid #0d241d; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: #f2c14e; color: #14342b; border-radius: 6px; font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.text-button { border: 0; background: transparent; color: inherit; padding: 7px 8px; }
.workspace { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 0; }
.sidebar { padding: 18px 14px; background: #fff; border-right: 1px solid #d9dfdc; }
.sidebar-label { margin: 0 8px 8px; color: #66736e; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.nav-item { width: 100%; border: 0; border-radius: 5px; padding: 9px 10px; text-align: left; color: #33423d; background: transparent; }
.nav-item[aria-current="page"] { color: #14342b; background: #e6efeb; font-weight: 700; }
.content { min-width: 0; padding: 22px 28px 40px; }
.page-head { display: flex; gap: 18px; justify-content: space-between; align-items: end; margin-bottom: 18px; }
h1 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: 0; }
.muted { color: #66736e; }
.selectors { display: flex; gap: 10px; flex-wrap: wrap; }
.field { display: grid; gap: 5px; min-width: 180px; }
.field label { color: #53615c; font-size: 12px; font-weight: 700; }
input, select { min-height: 38px; border: 1px solid #bcc7c2; border-radius: 5px; padding: 7px 9px; background: #fff; color: #18211e; }
input:focus, select:focus, button:focus-visible { outline: 3px solid #8bbdab; outline-offset: 1px; }
.toolbar { display: flex; gap: 10px; align-items: end; margin: 16px 0; }
.search-field { flex: 1; max-width: 520px; }
.button { min-height: 38px; border: 1px solid #14342b; border-radius: 5px; padding: 7px 12px; background: #14342b; color: #fff; font-weight: 650; }
.button.secondary { color: #14342b; background: #fff; }
.button:disabled { cursor: default; opacity: .55; }
.table-wrap { overflow: auto; border: 1px solid #d4dbd8; background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #e2e7e5; }
th { color: #53615c; background: #f7f9f8; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 7px; border-radius: 4px; font-size: 12px; background: #e8ecea; }
.status.checked { color: #174f3c; background: #dcefe7; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.row-action { border: 1px solid #b8c3be; border-radius: 4px; padding: 5px 8px; background: #fff; color: #26342f; }
.empty { padding: 44px 20px; text-align: center; color: #66736e; background: #fff; border: 1px solid #d4dbd8; }
.notice { margin: 14px 0; padding: 10px 12px; border-left: 4px solid #bd4b42; background: #fff0ee; color: #732c27; }
.login { min-height: calc(100vh - 56px); display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(440px, 100%); padding: 28px; background: #fff; border: 1px solid #d4dbd8; border-radius: 8px; }
.login-panel h1 { margin-bottom: 8px; }
.login-panel .button { width: 100%; margin-top: 18px; }
dialog { width: min(520px, calc(100% - 28px)); border: 1px solid #aebbb5; border-radius: 8px; padding: 0; box-shadow: 0 18px 60px rgb(0 0 0 / 22%); }
dialog::backdrop { background: rgb(14 26 22 / 45%); }
.dialog-body { padding: 20px; }
.dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid #dce2df; background: #f7f9f8; }
.loading { padding: 36px; color: #53615c; }

@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 18px 14px 32px; }
  .page-head { align-items: stretch; flex-direction: column; }
  .selectors { display: grid; }
  .field { min-width: 0; }
  .dialog-grid { grid-template-columns: 1fr; }
}
