:root {
  --red: #c53137;
  --ink: #262b31;
  --white: #ffffff;
  --paper: #f5f6f7;
  --line: #dce0e4;
  --muted: #59636d;
  --radius: 12px;
  font-family: Calibri, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 16px;
  background: white;
  color: var(--ink);
  font-weight: 600;
  min-height: 44px;
}
button:hover {
  background: #eceff1;
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
.primary {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.primary:hover {
  background: #ac2b30;
}
input,
select {
  width: 100%;
  border: 1px solid #89939e;
  border-radius: 7px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  min-height: 44px;
}
label {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
  font-weight: 600;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.7px;
  margin-bottom: 10px;
}
h2 {
  font-size: 24px;
  line-height: 1.25;
}
p {
  line-height: 1.5;
  color: var(--muted);
}
:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -100px;
  left: 12px;
  background: white;
  padding: 12px;
  z-index: 5;
}
.skip:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-brand {
  background: var(--ink);
  color: white;
  padding: 12vh 8vw;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.login-brand img {
  height: 55px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 65px;
}
.login-brand h1 {
  font-size: 46px;
  max-width: 490px;
}
.login-brand p {
  color: #dce0e4;
}
.dev-tag {
  display: inline-block;
  border: 1px solid #78838d;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 13px;
}
.login-form {
  align-self: center;
  width: min(440px, 100%);
  padding: 35px;
  margin: auto;
}
.login-form .primary {
  width: 100%;
}
.error {
  color: var(--red);
  margin: 14px 0;
  min-height: 20px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  background: var(--ink);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
}
.brand img {
  height: 36px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
  margin-bottom: 20px;
}
.brand strong {
  font-size: 25px;
  display: block;
  margin-bottom: 36px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav button {
  color: #dce0e4;
  background: transparent;
  border-color: transparent;
  text-align: left;
}
.sidebar nav button:hover {
  background: #363d45;
}
.sidebar nav button[aria-current] {
  color: white;
  background: #3a414a;
  border-left: 4px solid var(--red);
  padding-left: 13px;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 40px;
}
.sidebar-bottom p {
  color: #dce0e4;
  font-size: 14px;
  margin-top: 16px;
  overflow-wrap: anywhere;
}
.sidebar-bottom button {
  background: transparent;
  color: white;
  border-color: #78838d;
  width: 100%;
}
.content {
  margin-left: 250px;
}
header {
  height: 96px;
  padding: 22px 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: white;
}
header > div {
  display: grid;
  gap: 4px;
}
header span {
  color: var(--muted);
  font-size: 14px;
}
header strong {
  font-size: 21px;
}
.role {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 10px;
}
main {
  max-width: 1250px;
  margin: 0 auto;
  padding: 44px;
  min-height: calc(100vh - 145px);
}
.heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 24px;
}
.heading p {
  max-width: 65ch;
}
.message:empty {
  display: none;
}
.message {
  padding: 12px 16px;
  border-left: 3px solid var(--red);
  background: white;
}
.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.summary button {
  padding: 28px;
  text-align: left;
  border-radius: var(--radius);
  display: grid;
  gap: 12px;
  font-weight: 400;
}
.summary strong {
  font-size: 42px;
  line-height: 1;
}
.summary span {
  font-size: 18px;
  font-weight: 600;
}
.summary small {
  color: var(--muted);
  font-size: 14px;
}
.getting-started {
  margin-top: 32px;
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  padding: 30px;
}
.getting-started ol {
  line-height: 1.9;
  color: var(--muted);
  padding-left: 22px;
}
.search {
  margin-bottom: 25px;
  max-width: 510px;
}
.search > div {
  display: flex;
  gap: 10px;
}
.search label {
  margin-bottom: 8px;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border: 1px solid var(--line);
}
th,
td {
  text-align: left;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}
th {
  font-weight: 600;
  background: #eceff1;
  color: var(--muted);
  font-size: 14px;
}
td small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  color: var(--muted);
}
.empty {
  background: white;
  border: 1px dashed #89939e;
  border-radius: var(--radius);
  padding: 38px;
}
.empty h2 {
  font-size: 22px;
}
.empty p {
  margin: 0;
}
.table-scroll {
  overflow-x: auto;
}
footer {
  font-size: 13px;
  color: var(--muted);
  padding: 15px 44px;
  border-top: 1px solid var(--line);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
  width: min(570px, calc(100% - 28px));
  max-height: 90vh;
  color: var(--ink);
}
dialog::backdrop {
  background: rgba(38, 43, 49, 0.65);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  margin: 6px 0;
}
.dialog-heading button {
  font-size: 24px;
  padding: 0;
  width: 44px;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 20px;
}
.hint {
  font-size: 14px;
  margin-top: -8px;
}
#fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
#fields .wide {
  grid-column: 1/-1;
}
@media (max-width: 1000px) {
  .sidebar {
    width: 215px;
  }
  .content {
    margin-left: 215px;
  }
  header,
  main,
  footer {
    padding-left: 26px;
    padding-right: 26px;
  }
  .summary {
    gap: 12px;
  }
  .summary button {
    padding: 21px;
  }
  .heading h1 {
    font-size: 31px;
  }
}
@media (max-width: 700px) {
  .login {
    grid-template-columns: 1fr;
  }
  .login-brand {
    padding: 30px;
  }
  .login-brand img {
    height: 36px;
    margin-bottom: 25px;
  }
  .login-brand h1 {
    font-size: 32px;
  }
  .login-form {
    padding: 30px;
  }
  .sidebar {
    position: static;
    width: auto;
    padding: 20px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  .brand img {
    height: 28px;
    margin: 0;
  }
  .brand strong {
    font-size: 22px;
    margin: 0;
  }
  .sidebar nav {
    margin-top: 20px;
    grid-template-columns: 1fr 1fr;
  }
  .sidebar-bottom {
    padding-top: 16px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
  }
  .sidebar-bottom p {
    margin: 0;
    flex: 1;
  }
  .sidebar-bottom button {
    width: auto;
  }
  .sidebar-bottom .dev-tag {
    display: none;
  }
  .content {
    margin-left: 0;
  }
  header {
    height: auto;
    padding: 20px;
  }
  .role {
    font-size: 12px;
  }
  main {
    padding: 28px 20px;
  }
  .heading {
    flex-wrap: wrap;
  }
  .summary {
    grid-template-columns: 1fr;
  }
  .summary button {
    grid-template-columns: 50px 1fr;
    align-items: center;
  }
  .summary small {
    grid-column: 2;
  }
  .getting-started {
    padding: 22px;
  }
  th,
  td {
    padding: 14px 12px;
  }
  .row-actions button {
    font-size: 13px;
    padding: 9px;
  }
  .pagination {
    font-size: 13px;
  }
  .pagination button {
    padding: 9px;
  }
  footer {
    padding: 16px 20px;
  }
  #fields {
    grid-template-columns: 1fr;
  }
  #fields .wide {
    grid-column: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.team-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 25px;
}
.finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
#finance-editor {
  width: min(850px, calc(100vw - 24px));
}
.finance-detail {
  margin-top: 20px;
}
.import-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-top: 24px;
}
.import-panel h2 {
  margin-top: 0;
}
.import-panel .table-scroll {
  margin: 20px 0;
}
@media (max-width: 700px) {
  .finance-grid {
    grid-template-columns: 1fr;
  }
}
.invitation-heading {
  margin-top: 35px;
}
.invitation-list {
  list-style: none;
  padding: 0;
  border: 1px solid var(--line);
  background: white;
  border-radius: 10px;
}
.invitation-list li {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.invitation-list li:last-child {
  border-bottom: 0;
}
.invitation-list p {
  margin: 4px 0 0;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 18px;
  padding: 15px;
}
legend {
  font-weight: 600;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 400;
  margin: 10px 0;
}
.checkbox input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  accent-color: var(--red);
}
textarea {
  font: inherit;
  width: 100%;
  padding: 12px;
  border: 1px solid #89939e;
  border-radius: 7px;
  resize: vertical;
}
.accept-section {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}
.accept-card {
  max-width: 570px;
  padding: 35px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}
@media (max-width: 700px) {
  .team-heading {
    flex-direction: column;
  }
  .accept-card {
    padding: 25px;
  }
  .invitation-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}

.sensitive-demo pre { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }

/* Explicit temporary stock counting; existing tenant tokens and form styling. */
.stock-count-preparation,.stock-count-line{min-width:0;max-width:100%;overflow-wrap:anywhere}
.stock-count-line input,.stock-count-line textarea{max-width:100%;min-width:0}
