/*
 * Al Shams fixed application shell.
 * Keeps the whole interface inside one fixed-size app frame.
 * Does not replace page colors, cards, buttons, or table styles.
 */
:root {
  --app-shell-width: 1280px;
  --app-shell-height: 820px;
  --app-shell-gap: 16px;
}

html {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #eef5f2;
}

body {
  width: min(var(--app-shell-width), calc(100vw - 32px)) !important;
  height: min(var(--app-shell-height), calc(100vh - 32px)) !important;
  max-width: var(--app-shell-width) !important;
  max-height: var(--app-shell-height) !important;
  margin: 16px auto !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 18px !important;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .16) !important;
  background-clip: padding-box !important;
}

html:has(body.embedded-transactions) {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: transparent !important;
}

body.embedded-transactions {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  overflow: auto !important;
  display: block !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

body.embedded-transactions .container {
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 auto 14px !important;
  padding: 0 !important;
  overflow: visible !important;
  display: block !important;
}

.header {
  flex: 0 0 auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.topbar {
  flex: 0 0 auto !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

.container,
.page-container,
.main-container,
.content,
.content-wrapper,
main,
#report-details,
body > .section,
body > .panel,
body > .package-panel {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}

.container,
.page-container,
.main-container,
.content,
.content-wrapper,
main {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding-left: var(--app-shell-gap) !important;
  padding-right: var(--app-shell-gap) !important;
}

#report-details,
body > .section,
body > .panel,
body > .package-panel {
  max-height: 100% !important;
  overflow: auto !important;
}

.table-wrap,
.table-container,
.report-table-wrap,
.expiry-table-wrap {
  max-width: 100% !important;
  overflow: auto !important;
  box-sizing: border-box !important;
}

@media (max-width: 700px) {
  :root {
    --app-shell-gap: 10px;
  }

  body {
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
}

@media print {
  html,
  body {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    display: block !important;
  }
}
