:root {
  --body-padding: 8px;
  --default-font-size: 16px;
  --default-icon-size: 24px;
  --table-header-bg-color: #dedede;
  --table-border: 1px solid var(--table-header-bg-color);
  --table-icon-size: 16px;
  --table-padding: 4px;
  --toolbar-height: 24px;
  --currency-width: 110px;
}

/* material icons */

.md-icon {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: var(--default-icon-size);
  display: inline-block;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga';
  color: rgba(0, 0, 0, 0.54);
}

th.md-icon {
  display: table-cell;
  text-align: center;
  font-size: var(--default-font-size);
}

.md-icon.inactive {
  color: rgba(0, 0, 0, 0.26);
}

.md-icon.md-18 {
  font-size: 18px;
}

.md-icon.md-24 {
  font-size: 24px;
}

.md-icon.md-36 {
  font-size: 36px;
}

.md-icon.md-48 {
  font-size: 48px;
}

/* elements */

* {
  box-sizing: border-box;
  user-select: none;
}

html {
  margin: 0;
  padding: 0;
  font-family: Calibri;
  font-size: var(--default-font-size);
}

body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: var(--body-padding);
  line-height: 1;
  overflow: hidden;
}

/* classes */

.font-18 {
  font-size: 18px;
}

.align-left {
  text-align: left;
}

.align-center {
  text-align: center;
}

.float-right {
  float: right;
}

.hidden {
  display: none;
}

.full-width {
  width: 100%;
}

.fixed-width {
  table-layout: fixed;
}

.nowrap {
  white-space: nowrap;
}

.italic {
  font-style: italic;
}

.date {
  white-space: nowrap;
}

.currency {
  text-align: right;
}

.currency::before {
  content: "$\00a0";
}

.percentage {
  text-align: right;
}

.percentage::after {
  content: "\00a0%";
}

.discard, tr.discard span:not(.table-icon) {
  font-style: italic;
  text-decoration: line-through;
}

.clickable {
  cursor: pointer;
}

/* input */

.date-input {
  width: 100px;
}

/* tables */

table {
  text-align: left;
  border: none;
  border-spacing: 0;
  border-collapse: collapse;
}

tr:nth-child(odd), tr:nth-child(odd) input {
  background: #fff;
}

tr:nth-child(even), tr:nth-child(even) input {
  background: #efefef;
}

tr.child {
  font-size: calc(var(--default-font-size) - 1px);
}

th {
  position: sticky;
  top: 0;
  vertical-align: bottom;
  padding: var(--table-padding);
  background: var(--table-header-bg-color);
  border: var(--table-border);
}

.th-icon {
  width: 25px;
}

.th-id {
  width: 50px;
}

.th-account {
  width: 175px;
}

.th-date {
  width: 90px;
}

.th-description {
  width: auto;
}

.th-amount {
  width: var(--currency-width);
  text-align: right;
}

.th-receipt {
  width: 25px;
}

.th-category {
  width: 200px;
}

.th-shared {
  width: 50px;
}

.th-tags {
  width: 175px;
}

.th-memo {
  width: auto;
}

.th-balance {
  width: var(--currency-width);
  text-align: right;
}

.th-transfer {
  width: var(--currency-width);
  text-align: right;
}

.th-fees {
  width: var(--currency-width);
  text-align: right;
}

.th-paid {
  width: 100px;
}

.th-number {
  width: 100px;
}

.th-rate {
  width: var(--currency-width);
  text-align: right;
}

.th-tax {
  width: 100px;
  text-align: right;
}

.th-count {
  width: 50px;
}

td {
  vertical-align: top;
  padding: var(--table-padding);
  border: var(--table-border);
}

table.tight td {
  padding-top: 0;
  padding-bottom: 0;
}

td.action {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

td.review {
  color: #004085;
  background-color: #cce5ff;
  border-color: #b8daff;
}

td .value {
  display: inline-block;
  vertical-align: top;
  min-height: var(--default-font-size);
  padding: 0;
  border: none;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

td input.value:focus-visible {
  outline: none
}

.table-icon {
  width: var(--table-icon-size);
  vertical-align: top;
  font-size: var(--table-icon-size);
}

/* popups */

.popup-panel {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  padding: var(--body-padding);
  background: rgba(0, 0, 0, 25%);
}

.popup-panel div:first-child {
  position: relative;
  display: inline-block;
}

.popup-note {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  padding: var(--body-padding);
  background: rgba(255, 200, 0, 0.95);
}

.popup-note .header {
  height: var(--default-icon-size);
  background: rgba(225, 175, 0, 0.50);
  cursor: move;
}

.popup-note .label {
  display: inline-block;
  width: 100px;
}

.popup-note .label.currency {
  text-align: left;
}

/* toolbar */

.toolbar {
  height: var(--toolbar-height);
}

.toolbar span, .toolbar input {
  vertical-align: top;
}

.toolbar .excel-name-label {
  font-size: var(--default-icon-size);
}

/* content */

.content-panel {
  display: inline-block;
  width: 100%;
  overflow: auto;
}

.content-panel.full-height {
  height: calc(100vh - 2 * var(--body-padding) - 2 * var(--toolbar-height));
}

/* home */

.home-item {
  display: inline-grid;
  grid-template-columns: 2fr 1fr;
  width: 400px;
  margin: 2px 0;
  padding: 10px 5px;
  border: 1px solid;
}