/* GUARD pitch — Inside-the-app screen mocks
   Faithful reproduction of the real ZGUARD_SET / ZGUARD_CONF Fiori dynpro UI. */

.screen {
  margin: 16px 0 6px;
}
.screen__caption {
  font-size: 13px;
  color: var(--text-subtle);
  margin: 8px 0 0;
  font-style: italic;
  line-height: 1.5;
}

/* ============== App-style mock (full screen) ============== */
.sap-app {
  background: #fff;
  border: 1px solid #c9c8c7;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--surface-shadow);
  font-family: "72", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  color: #1f2937;
}

/* ----- Top dark Fiori bar ----- */
.sap-app__topbar {
  background: #354a5f;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: #fff;
  font-size: 14px;
}
.sap-app__back {
  color: #fff;
  font-weight: 600;
  margin-right: 12px;
  font-size: 16px;
  cursor: default;
  user-select: none;
}
.sap-app__logo {
  background: #008fd3;
  color: #fff;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 14px;
}
.sap-app__title {
  margin-left: auto;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: #fff;
}
.sap-app__title em {
  font-style: normal;
  font-weight: 600;
}

/* ----- Toolbar row ----- */
.sap-app__toolbar {
  background: #fff;
  border-bottom: 1px solid #e3e1e0;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: #475569;
  min-height: 38px;
}
.sap-app__toolbar-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: default;
  user-select: none;
}
.sap-app__toolbar-item .chev {
  font-size: 10px;
  color: #94a3b8;
}
.sap-app__toolbar-input {
  height: 26px;
  width: 180px;
  border: 1px solid #c9c8c7;
  border-radius: 2px;
  background: #fff;
  position: relative;
}
.sap-app__toolbar-input::after {
  content: "▾";
  position: absolute;
  right: 6px;
  top: 5px;
  color: #94a3b8;
  font-size: 10px;
}
.sap-app__toolbar-icons {
  display: inline-flex;
  gap: 8px;
}
.sap-app__toolbar-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #007cc0;
  border-radius: 2px;
}
.sap-app__toolbar-icon:hover {
  background: #f0f4f8;
}

/* ----- Body: tree + content ----- */
.sap-app__body {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 360px;
}
@media (max-width: 760px) {
  .sap-app__body { grid-template-columns: 1fr; }
}

/* ----- Sidebar (Dialog Structure) ----- */
.sap-app__sidebar {
  background: #fff;
  border-right: 1px solid #e3e1e0;
}
.sap-app__sidebar-title {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  background: #f5f6f7;
  border-bottom: 1px solid #e3e1e0;
}
.sap-tree {
  list-style: none;
  margin: 0;
  padding: 6px 4px 6px 6px;
  font-size: 12.5px;
}
.sap-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 18px;
}
.sap-tree li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 2px;
  color: #1f2937;
  cursor: default;
}
.sap-tree li:hover { background: #eef0f2; }
.sap-tree li.is-selected {
  background: #d8e9f7;
  color: #0a4f92;
  font-weight: 500;
}
.sap-tree__chev {
  color: #94a3b8;
  font-size: 10px;
  width: 10px;
  display: inline-block;
}
.sap-tree__folder {
  width: 14px;
  height: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #888;
}
.sap-tree li.is-selected .sap-tree__folder { color: #0a4f92; }

/* ----- Main content pane ----- */
.sap-app__main {
  background: #f5f6f7;
  padding: 16px 24px 18px;
  font-size: 13px;
}

.sap-app__filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  margin-bottom: 22px;
}
.sap-app__field {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sap-app__field-label {
  color: #475569;
  font-size: 13px;
  min-width: 60px;
  text-align: right;
}
.sap-app__field-input {
  background: #fff;
  border: 1px solid #c9c8c7;
  border-radius: 2px;
  padding: 4px 10px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #1f2937;
  min-width: 120px;
  position: relative;
}
.sap-app__field-input--readonly {
  background: #f5f6f7;
  color: #475569;
}
.sap-app__field-input::after {
  content: "";
  display: inline-block;
}
.sap-app__field-button {
  width: 22px;
  height: 22px;
  border: 1px solid #c9c8c7;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #007cc0;
  background: #fff;
  font-size: 12px;
}

.sap-app__hint {
  font-size: 13px;
  color: #475569;
  margin: 0 0 6px;
}
.sap-app__hint code {
  font-family: "Courier New", monospace;
  background: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid #e3e1e0;
  color: #007cc0;
  font-weight: 600;
}

.sap-app__section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 12px 0 8px;
  font-family: var(--font-body);
}

/* ----- Data table inside the app ----- */
.sap-app__table-wrap {
  background: #fff;
  border: 1px solid #e3e1e0;
  border-radius: 2px;
  overflow-x: auto;
}
.sap-app__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sap-app__table thead th {
  background: #f5f6f7;
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #c9c8c7;
  font-weight: 600;
  color: #475569;
  font-size: 12.5px;
  white-space: nowrap;
}
.sap-app__table tbody td {
  padding: 6px 12px;
  border-bottom: 1px solid #ebeaea;
  color: #1f2937;
  vertical-align: middle;
}
.sap-app__table tbody tr:last-child td { border-bottom: 0; }
.sap-app__table tbody tr:hover { background: #f8f9fa; }
.sap-app__table tbody td.code,
.sap-app__table tbody td code {
  font-family: "Courier New", monospace;
}
.sap-app__table .col-check {
  width: 24px;
  padding: 6px 4px 6px 12px;
}
.sap-app__table .col-narrow { white-space: nowrap; }

/* SAP-style empty checkbox in tables */
.sap-cb {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid #94a3b8;
  border-radius: 1px;
  background: #fff;
  vertical-align: middle;
}
.sap-cb.is-on {
  background: #fff;
  position: relative;
}
.sap-cb.is-on::after {
  content: "✓";
  position: absolute;
  inset: -2px 0 0 1px;
  color: #1f2937;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

/* Data-preview cell (icon + text) */
.sap-data-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sap-data-pill__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 1px solid #c9c8c7;
  border-radius: 2px;
  color: #007cc0;
  flex-shrink: 0;
}
.sap-data-pill__text {
  font-family: "Courier New", monospace;
  font-size: 12px;
  color: #475569;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Stack of captions/screens helper */
.screens-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 6px;
}

/* Two-up grid for side-by-side smaller screens */
.screens-2up {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 16px 0 6px;
}
@media (min-width: 900px) {
  .screens-2up { grid-template-columns: repeat(2, 1fr); }
}
.screens-2up .sap-app { margin: 0; }

/* Compact table variant — used on Messages screen so the message variables
   fit without horizontal overflow. */
.sap-app__table--compact thead th {
  padding: 6px 8px;
  font-size: 12px;
}
.sap-app__table--compact tbody td {
  padding: 5px 8px;
  font-size: 12.5px;
  line-height: 1.4;
}
