:root {
  --tbl-header-rgb: 112.520718,44.062154,249.437846;
}

.page {
  display: none;
}

.x-hdr-wrapper {
  /*height: 50px;*/
  position: sticky;
  top:0;
  background-color: white;
  /*overflow: hidden;*/
}
body.offline .x-hdr-wrapper,
body.witherror .x-hdr-wrapper {
  background-color: red;
}
.hdr {
  width: 95%;
  margin: auto;
}
body > svg {
  display: none;
}

#menuBtn {
  position: absolute;
  top:7px;
  left:7px;
  width: 30px;
}

.queueStatus {
  position: absolute;
  top: 0;
  right:5px;
  font-size: 0.8rem;
}
.queueStatus:empty {
  display: none;
}


/*
html, body {
  margin: 0;
  padding: 0;
  font-family: lato, sans-serif;
  font-size: 16px;
}
#svgDefs {
  display: none;
}
.center {
  text-align: center;
}
*/


/*
select {
  font-size: 1rem;
  border: 2px solid;
  border-image: var(--bg-button);
  border-image-slice: 1;
}
.page {
  max-width: var(--portrait-width);
  padding: 0 0.2rem;
}
.page-wide {
  max-width: var(--landscape-width);
}
.page-wide2 {
  max-width: 1600px;
}
.page-full {
  width: 100vw;
  padding: 0;
}
.page, .page-wide, .page-wide2, .page-full {
  background-color: var(--bg-page);
  margin: 0 auto;
  min-height: 100vh;

  position: relative;
  display: none;
  box-sizing: border-box;
}

.pageContent {
  width: 100%;
  min-height: 100vh;
  margin-bottom: -4rem;
  position: relative;
  box-sizing: border-box;
}
.bgViolet {
  background-image: linear-gradient(to bottom, rgba(var(--bd-violet-rgb), 1), rgba(var(--bd-violet-rgb), 0.95));
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15), inset 0 -1px 0 rgba(0,0,0,0.15);
}*/

.x-transactions-tbl {
  font-size: 12px;
}
/*
.x-transactions-tbl thead th {
  position: sticky;
  top: 50px;
}*/

.tbl-header {
  font-size: 14px;
  /*
  background-image: linear-gradient(to bottom, rgba(var(--tbl-header-rgb), 1), rgba(var(--tbl-header-rgb), 0.95));
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15), inset 0 -1px 0 rgba(0,0,0,0.15);
  */
}
.no-border {
  border-bottom-width: 0 !important;
}

.wem4 {
  width: 4em !important;
}
.wem5 {
  width: 5em !important;
}
.wem55 {
  width: 5.5em !important;
}
.wrem59 {
  width: 5.9rem !important;
}
.wem6 {
  width: 6em !important;
}
.wem7 {
  width: 7em !important;
}
.wem8 {
  width: 8em !important;
}
.wem10 {
  width: 10em !important;
}
.wem11 {
  width: 11em !important;
}
.w100 {
  width: 100% !important;
}

.form-select-xs {
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  padding-left: 0.5em;
  font-size: 12px;
  border-radius: 0.25em;
}
.form-control-xs {
  min-height: calc(1.5em + 0.5em + 2px);
  padding: 0.25em 0.5em;
  font-size: 12px;
  border-radius: 0.25em;
}

.btn-xs {
  --bs-btn-padding-y: 0.25em;
  --bs-btn-padding-x: 0.5em;
  --bs-btn-font-size: 12px;
  --bs-btn-border-radius: 0.25em;
}

#addBtn {
  color: white;
  font-weight: bold;
}

/********************* Flex variant **********************/

.x-tbl-header {
  font-size: 14px;
  font-weight: 700;
  color: white;
  box-shadow: inset 0 0 0 9999px transparent;
  padding: 0;
}
.x-tbl-body {
  padding-top: 8px;
}
.x-flex-tbl-row {
  display: flex;
}
.x-row {
  font-size: 12px;
  border-bottom: 1px solid rgb(222, 226, 230);
  line-height: 20px;
}
.x-row-edit {
  font-size: 12px;
  line-height: 20px;
  background-color: aquamarine;
  padding: 5px 0;
}
.x-row-balance {
  background-color: greenyellow;
}
.x-small {
  font-size: 8px;
}

/*
.x-row span {
  line-height: 1em;
}*/
.x-row-control {
  padding: 4px 0;
}
.x-flex-tbl-row span {
  padding: 4px 3px;
  text-align: center;
}
.x-flex-tbl-row span * {
  vertical-align: top;
}

.x-flex-tbl-row span:nth-child(1) {
  /* ID */
  flex: 1 0 4rem;
}
.x-flex-tbl-row span:nth-child(2) {
  /* Date */
  flex: 1 0 6.1rem;
}
.x-flex-tbl-row span:nth-child(3) {
  /* IN/OUT , was: 4.8*/
  flex: 0 0 6.1rem;
}
.x-flex-tbl-row span:nth-child(4) {
  /* Amount */
  flex: 2 0 8rem;
  text-align: right;
}
.x-flex-tbl-row span:nth-child(5) {
  /* Project */
  flex: 1 0 6rem;
}
.x-flex-tbl-row span:nth-child(6) {
  /* Category */
  flex: 1 1 10rem;
}
.x-flex-tbl-row span:nth-child(7) {
  /* Subcat */
  flex: 1 1 9rem;
}
.x-flex-tbl-row span:nth-child(8) {
  /* Description */
  flex: 5 1 10rem;
}
.x-flex-tbl-row span:nth-child(9) {
  /* Qty */
  flex: 0 0 3.5rem;
}
.x-flex-tbl-row span:nth-child(10) {
  /* Unit size */
  flex: 0 0 3.5rem;
}
.x-flex-tbl-row span:nth-child(11) {
  /* Price */
  flex: 1 0 5rem;
  text-align: right;
}
.x-flex-tbl-row span:nth-child(12) {
  /* Supplier */
  flex: 3 5 10rem;
}
.x-flex-tbl-row span:nth-child(13) {
  /* Invoice no */
  flex: 0 2 4rem;
}
.x-flex-tbl-row span:nth-child(14) {
  /* Pay status */
  flex: 1 0 5rem;
}
.x-flex-tbl-row span:nth-child(15) {
  /* Button */
  flex: 0 0 4rem;
}

.x-border-btm {
  border-bottom: 2px solid black;
}


/********************* Report Page **********************/

#reportTable .x-cell {
  text-align: right;
  min-width: 5em;
}
#reportTable .x-cell-center {
  text-align: center;
}



/********************* Suppliers Page **********************/
.x-flex-tbl-sup-row {
  display: flex;
}
.x-flex-tbl-sup-row span {
  padding: 4px 3px;
  text-align: center;
}
.x-flex-tbl-sup-row span * {
  vertical-align: middle;
}


.x-flex-tbl-sup-row span:nth-child(1) {
  /* Dates */
  flex: 0 1 11rem;
  text-align: left;
}
.x-flex-tbl-sup-row span:nth-child(2) {
  /* For/Project */
  flex: 2 0 7rem;
}
.x-flex-tbl-sup-row span:nth-child(3) {
  /* Invoice # */
  flex: 2 0 6rem;
}
.x-flex-tbl-sup-row span:nth-child(4) {
  /* Amount TZS*/
  flex: 1 0 7rem;
}
.x-flex-tbl-sup-row span:nth-child(5) {
  /* Amount USD*/
  flex: 1 0 5rem;
}
.x-flex-tbl-sup-row span:nth-child(6) {
  /* Payment status */
  flex: 1 0 6rem;
}
.x-flex-tbl-sup-row span:nth-child(7) {
  /* ID/Cat/Subcat/Description */
  flex: 10 1 10rem;
  text-align: left;
}




/* ===== Expander button ===== */
.expander {
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 1;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 180ms ease;
}
/* The chevron itself (SVG) rotates when expanded */
.expander svg {
  width: 16px;
  height: 16px;
  transform: rotate(0deg);
  transition: transform 180ms ease;
}
.expander[aria-expanded="true"] svg {
  transform: rotate(90deg); /* clockwise */
}
.x-row-invtrans {
  color: blue;
  font-style: italic;
  font-size: 10px;
}

.x-row-not-in-balance {
  color: gray;
  font-style: italic;
}
.x-row-cash {
  color: lightgray;
  font-style: italic;
}




/********************* Config Page **********************/
.x-txtarea-big {
  height: 20rem;
}
.x-txtarea-small {
  height: 15rem;
}

.x-user-prj-sel {
  min-width: 15rem;
}

/********************* Login page **********************/


#loginPage {
  position: absolute;
  top:0;
  left:0;
  right: 0;
  bottom: 0;
  background: url('img/login.jpg') no-repeat fixed center center;
  background-size: cover;
  display: none;
}
#loginPage > div {
  margin-top: 45vh;
  text-align: center;
}
#loginPage input {
  margin-bottom: 1em;
  width: 20rem;
}
#lgnErrorTxt {
  color: white;
  background-color: rgba(0,0,0,0.3);
}




/********************* Warning page **********************/

#warningPage {
  position: fixed;
  top:0;
  left:0;
  right: 0;
  bottom: 0;
  background-color: black;
  opacity: 0;
  color:white;
  padding-top: 30vh;
  display: none;
  transition: opacity 1s linear;
}
#warningPage h1 {
  text-align: center;
}


/* Custom styles for nested dropdown */
.dropdown-menu .dropdown-submenu {
  position: relative;
}
.dropdown-menu .dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: 0;
  margin-left: 0;
}
.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

#sisterSitesSubmenu {
  display: none;
}



/********************* Print page **********************/


#printPage {
  display: none;
  margin: 0;
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  position: relative;
  font-size: 12px;
  /*background-color: aliceblue; -> this is for development */
}

.printDate {
  position: fixed;
  top: 0;
  right: 0;
  font-size: 14px;
  width: 10em;
  text-align: right;
}
.margin-up {
  margin-top: 1em;
}

@media print {
  html, body {
    /*height:100vh;*/
    margin: 0;
    padding: 0;
    background-color: white;
  }
}

@media screen {
  #printPage {
    visibility: hidden;
  }
}