/* Padrão de processos — alinhado ao portal SAP CCSKF */

.app-shell--process {
  display: block;
}

.app-shell--process .app-main {
  max-width: none;
  padding: 0;
}

.proc-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
  background: #f5f7fa;
}

.proc-menu {
  background: #fff;
  border-right: 1px solid #d9e0ea;
  padding: 0.85rem 0.7rem 1.4rem;
  overflow-y: auto;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 72px);
}

.proc-menu__title {
  display: inline-flex;
  align-items: center;
  margin: 0 0.35rem 0.85rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid #1f4e79;
  border-radius: 8px;
  color: #1f4e79;
  font-weight: 800;
  font-size: 0.95rem;
}

.proc-menu__list {
  display: grid;
  gap: 0.15rem;
}

.proc-menu__list a {
  display: block;
  padding: 0.48rem 0.65rem;
  border-radius: 6px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.25;
}

.proc-menu__list a:hover,
.proc-menu__list a.is-active {
  background: rgba(31, 78, 121, 0.08);
  color: #1f4e79;
  font-weight: 700;
}

.proc-content {
  padding: 0.6rem 1.1rem 1.4rem;
  min-width: 0;
}

.proc-topbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}

.proc-topbar__back,
.proc-topbar__menu {
  width: 34px;
  height: 34px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #fff;
  color: #1f4e79;
  font-size: 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.proc-topbar__menu {
  display: none;
}

.proc-topbar__ctx {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
}

.proc-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.2rem 0 0.9rem;
}

.proc-title__icon {
  color: #1f4e79;
  font-size: 1.5rem;
}

.proc-title h1 {
  margin: 0;
  color: #0f172a;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.proc-filters {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1rem 0.85rem;
  margin-bottom: 0.9rem;
}

.proc-filters__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem 0.75rem;
}

.proc-field {
  display: grid;
  gap: 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.proc-field input,
.proc-field select,
.proc-field textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0f172a;
  background: #fff;
}

.proc-field--wide {
  grid-column: 1 / -1;
}

.proc-field--ro .proc-ro {
  min-height: 2.3rem;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: #f1f5f9;
  border-bottom: 1px dashed #94a3b8;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 600;
}

.proc-filters__actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.proc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.proc-btn--primary {
  background: #2563eb;
  color: #fff;
}

.proc-btn--primary:hover {
  background: #1d4ed8;
}

.proc-btn--ghost {
  background: transparent;
  color: #2563eb;
  border-color: transparent;
}

.proc-btn--danger {
  background: #fff;
  color: #dc2626;
  border-color: #fca5a5;
}

.proc-link {
  color: #2563eb;
  font-weight: 700;
  font-size: 0.88rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: none;
}

.proc-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}

.proc-list__toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.proc-list__toolbar strong {
  color: #0f172a;
}

.proc-list__tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.proc-table-wrap {
  overflow-x: auto;
}

.proc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.proc-table th {
  text-align: left;
  padding: 0.65rem 0.55rem;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
  background: #f8fafc;
}

.proc-table td {
  padding: 0.7rem 0.55rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.proc-check {
  width: 36px;
  text-align: center;
}

.proc-row {
  cursor: pointer;
}

.proc-row:hover {
  background: rgba(37, 99, 235, 0.05);
}

.proc-row__go a {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #64748b;
  font-size: 1.2rem;
  font-weight: 700;
}

.proc-empty {
  text-align: center;
  color: #94a3b8;
  padding: 2.2rem 1rem !important;
}

.proc-list__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.proc-muted {
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.86rem;
}

.proc-add {
  color: #2563eb;
  font-weight: 800;
  font-size: 0.95rem;
}

.proc-ficha__actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.proc-status {
  margin: -0.35rem 0 0.85rem;
  color: #16a34a;
  font-weight: 700;
  font-size: 0.92rem;
}

.proc-status em {
  font-style: normal;
}

.proc-tabs {
  display: flex;
  gap: 1.2rem;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0.9rem;
}

.proc-tabs a {
  padding: 0.55rem 0.1rem 0.7rem;
  color: #64748b;
  font-weight: 700;
  border-bottom: 2px solid transparent;
}

.proc-tabs a.is-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

.proc-ficha__body {
  display: grid;
  gap: 0.9rem;
}

.proc-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem 1.15rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.proc-card h2 {
  margin: 0;
  font-size: 0.95rem;
  color: #0f172a;
}

.proc-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #e8eef5;
}

.proc-card__head .proc-muted {
  margin: 0;
  font-size: 0.82rem;
}

.proc-doc {
  display: grid;
  gap: 0.9rem;
}

.proc-doc__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 0.25rem 0 0.5rem;
}

.proc-form__grid textarea {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  resize: vertical;
  background: #fff;
}

.proc-card__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.proc-card__grid .proc-field--wide {
  grid-column: 1 / -1;
}

.proc-card__grid .proc-field--span2 {
  grid-column: span 2;
}

.proc-card__grid .proc-field--span3 {
  grid-column: span 3;
}

.proc-sc-tree {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.proc-sc-tree__parent {
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  padding: 1rem 1.1rem 1.15rem;
}

.proc-sc-tree__parent > h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.proc-sc-tree__child {
  margin-left: 1.1rem;
  padding-left: 1rem;
  border-left: 3px solid #94a3b8;
}

.proc-sc-tree__child .proc-card {
  margin: 0;
  box-shadow: none;
  border: 1px solid #e2e8f0;
}

.proc-sc-tree__child h2 {
  font-size: 0.95rem;
}

.proc-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.proc-items-table th,
.proc-items-table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid #e2e8f0;
}

.proc-itens {
  overflow-x: auto;
}

.proc-items-table--edit th {
  font-size: 0.78rem;
  color: #64748b;
  white-space: nowrap;
}

.proc-items-table--edit td {
  padding: 0.3rem 0.25rem;
  vertical-align: top;
}

.proc-items-table--edit input,
.proc-items-table--edit select {
  width: 100%;
  min-width: 7.5rem;
  padding: 0.42rem 0.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  background: #fff;
}

.proc-items-table--edit input[readonly] {
  background: #f1f5f9;
  color: #475569;
}

.proc-items-table--edit input.proc-cell--sm {
  min-width: 4.2rem;
  max-width: 6rem;
}

.proc-items-table--edit input.proc-cell--md {
  min-width: 6.5rem;
  max-width: 9.5rem;
}

.proc-itens__rm {
  width: 2rem;
}

.proc-itens__rm button {
  border: 0;
  background: transparent;
  color: #dc2626;
  font-size: 1.05rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.3rem;
}

.proc-itens__add {
  margin-top: 0.55rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.proc-form__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.proc-form__grid .proc-field--wide {
  grid-column: 1 / -1;
}

.proc-form__grid .proc-field--span2 {
  grid-column: span 2;
}

.proc-form__grid .proc-field--span3 {
  grid-column: span 3;
}

@media (max-width: 1200px) {
  .proc-form__grid,
  .proc-card__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .proc-form__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1200px) {
  .proc-filters__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .proc-shell {
    grid-template-columns: 1fr;
  }

  .proc-menu {
    display: none;
    position: fixed;
    inset: 72px 0 auto 0;
    z-index: 35;
    max-height: 70vh;
    border-bottom: 1px solid #d9e0ea;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  }

  .proc-shell.is-menu-open .proc-menu {
    display: block;
  }

  .proc-topbar__menu {
    display: inline-flex;
  }

  .proc-card__grid,
  .proc-filters__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .proc-card__grid,
  .proc-filters__grid {
    grid-template-columns: 1fr;
  }
}

/* Lookup F3 nos grids */
.proc-lk-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.22rem;
  min-width: 7.5rem;
  width: 100%;
}

.proc-lk-field {
  display: grid;
  gap: 0.35rem;
  width: 100%;
}

.proc-filters .proc-lk-field .proc-lk input {
  min-width: 12rem;
}

.kardex-row--ini {
  background: rgba(42, 155, 155, 0.08);
  font-weight: 600;
}

.proc-lk {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  width: 100%;
}

.proc-lk--sm {
  max-width: 7.5rem;
}

.proc-lk--md {
  max-width: 11rem;
}

.proc-lk__desc {
  display: block;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #64748b;
  padding: 0 0.2rem;
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proc-lk__desc.is-empty,
.proc-lk-wrap .proc-lk__desc:is(:empty) {
  color: #cbd5e1;
}

.proc-stock {
  margin-top: 0.35rem;
  max-width: min(28rem, 70vw);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: auto;
}

.proc-stock[hidden] {
  display: none !important;
}

.proc-stock__loading,
.proc-stock__empty {
  display: block;
  padding: 0.4rem 0.55rem;
  font-size: 0.72rem;
  color: #64748b;
}

.proc-stock__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.proc-stock__table th,
.proc-stock__table td {
  padding: 0.28rem 0.4rem;
  text-align: right;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.proc-stock__table th:first-child,
.proc-stock__table td:first-child {
  text-align: left;
}

.proc-stock__table thead th {
  color: #64748b;
  font-weight: 600;
  background: #f1f5f9;
}

.proc-stock__table tfoot th,
.proc-stock__table tfoot td {
  border-bottom: 0;
  font-weight: 650;
  background: #eef2f7;
}

.proc-stock__table tr.is-current td {
  background: #e0f2fe;
  color: #0c4a6e;
}

.proc-stock__disp {
  font-weight: 650;
  color: #047857;
}

.proc-items-table--edit .proc-lk-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
}

.proc-items-table--edit .proc-lk input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
}

.proc-lk__btn {
  flex: 0 0 1.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  color: #334155;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.proc-lk__btn:hover {
  background: #e2e8f0;
}

.proc-lk-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.45);
}

.proc-lk-modal[hidden] {
  display: none !important;
}

.proc-lk-modal__panel {
  width: min(720px, 100%);
  max-height: min(80vh, 640px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #dbe3ee;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.proc-lk-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.proc-lk-modal__head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
  color: #0f172a;
}

.proc-lk-modal__x {
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.proc-lk-modal__tools {
  display: flex;
  gap: 0.55rem;
  padding: 0.75rem 1rem 0.35rem;
}

.proc-lk-modal__tools input[type="search"] {
  flex: 1;
  padding: 0.55rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
}

.proc-lk-modal__hint {
  margin: 0;
  padding: 0 1rem 0.55rem;
  font-size: 0.82rem;
}

.proc-lk-modal__body {
  overflow: auto;
  padding: 0 0.5rem 0.75rem;
  flex: 1;
}

.proc-lk-modal__body .proc-items-table {
  width: 100%;
}

.proc-lk-modal__body tbody tr {
  cursor: default;
}

.proc-lk-modal__body tbody tr:hover {
  background: #f8fafc;
}
