/* Components: buttons, badges, panels, tables, forms, tabs, notices, dialogs and toasts. */

.dark {
  background: #e6eadf;
  color: #677859;
}

.save-state {
  font-size: 10px;
}

.icon-btn {
  display: inline-flex;
  position: relative;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
}

.page-head p {
  font-size: 12px;
}

.btn {
  padding: 12px 16px;
  font-size: 11px;
}

.btn:hover {
  background: #f1f5e9;
}

.btn.primary {
  background: var(--blue);
}

.btn.primary:disabled {
  opacity: .5;
}

.small-btn {
  padding: 9px 11px;
  font-size: 10px;
}

.head-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* A "back" link under a page's last panel. */
.page-back {
  margin-top: 20px;
}

.p1 {
  top: 15%;
  left: 28%;
}

.p2 {
  top: 40%;
  left: 64%;
}

.p3 {
  top: 66%;
  left: 18%;
}

.p4 {
  top: 73%;
  left: 69%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
  margin: 22px 0 25px;
}

.stat {
  padding: 19px 20px;
}

.stat:disabled {
  opacity: 1;
}

.stat>div {
  font-size: 10px;
}

.stat>strong {
  font-size: 28px;
}

.stat>small {
  font-size: 9px;
}

.panel {
  overflow: hidden;
}

.panel-head {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h2 {
  font-size: 14px;
}

.panel-foot {
  padding: 13px 22px;
  font-size: 9px;
}

.full {
  width: 100%;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0 16px;
}

.toolbar>select {
  width: 180px;
  font-size: 11px;
  padding: 10px 12px;
}

.toolbar>.btn {
  width: auto;
}

.table-panel {
  overflow: auto;
}

.person {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: none;
  text-align: left;
}

.person strong {
  display: block;
}

.person small {
  display: block;
  font-size: 9px;
  color: #a0a895;
  margin-top: 5px;
}

.table-foot {
  padding: 15px 22px;
  color: #9aa58e;
  font-size: 10px;
}

.notice {
  gap: 13px;
  padding: 18px 20px;
}

.notice>div {
  flex: 1;
}

.notice strong {
  font-size: 11px;
}

.notice p {
  font-size: 10px;
}

.tabs {
  gap: 22px;
}

.tabs button {
  font-size: 11px;
}

.empty {
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.modal-backdrop {
  background: #142c2390;
}

.modal {
  width: 470px;
  max-width: 100%;
  padding: 38px 34px;
}

.close-modal {
  position: absolute;
  right: 19px;
  top: 19px;
}

.modal h2 {
  font-size: 25px;
}

.modal form {
  margin-top: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-section {
  font-size: 12px;
  font-weight: 600;
  margin: 25px 0 0;
}

.checkbox {
  display: flex;
  flex-direction: row;
  gap: 9px;
  align-items: center;
  font-size: 11px;
}

.toast {
  left: calc(50% + 120px);
}

.mobile-menu {
  display: none;
}

.card-icon {
  width: 14px;
  height: 19px;
  display: block;
  border-radius: 2px;
  transform: rotate(12deg);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
  background: #16ae77;
}

.save-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #62758f;
}

.icon-btn {
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: none;
  border: 0;
  border-radius: 5px;
  color: #657693;
}

.icon-btn:hover {
  background: #e9eefb;
}

.page-head h1 {
  font-weight: 750;
}

.heading-dot {
  color: var(--blue);
}

.page-head p {
  margin-top: 11px;
  color: #74829b;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #dfe5d9;
  background: #fff;
  line-height: 1.3;
  white-space: nowrap;
  transition: background .15s,transform .15s;
  border-color: #d7deed;
  border-radius: 4px;
  font-weight: 650;
  color: #364766;
  font-size: 11px;
}

.btn.primary:hover {
  background: #2445bd;
}

.badge.outline {
  border: 1px solid #ffffff24;
  color: #fff;
  background: #102a7d24;
  border-color: #ffffff40;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 1px;
}

.stat-icon {
  display: flex;
  color: #3b5fce;
}

.stat.orange .stat-icon {
  color: #be863c;
}

.stat.orange>strong {
  color: #152647;
}

.stat.purple .stat-icon {
  color: #7465b9;
}

.stat>small {
  color: #8390a7;
}

.stat:enabled:hover {
  border-color: #9baee7;
}

.stats>.stat:first-child {
  border-top: 3px solid var(--blue);
  padding-top: 17px;
}

.stats>.stat:nth-child(2) {
  border-top: 3px solid #e5c62b;
  padding-top: 17px;
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  border-color: #e0e5ef;
}

.panel-head .small {
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #8996af;
}

.round-icon {
  display: flex;
  width: 37px;
  height: 37px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 5px;
}

.peach {
  background: #fff5d4;
  color: #ab8425;
}

.lavender {
  background: #edf0fe;
  color: #4a64bd;
}

.mint {
  background: #eaf0ff;
  color: #5476c9;
}

.text-btn {
  background: none;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 10px;
  padding: 4px 0;
  color: var(--blue);
  font-weight: 650;
}

.panel-foot {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 7px;
  background: #f6f8fc;
  color: #7d8ba6;
  border-color: #e5eaf4;
}

.color-0 {
  background: #e4ebff;
  color: #4566b6;
}

.color-1 {
  background: #fff4c7;
  color: #9c7925;
}

.color-2 {
  background: #e4eff3;
  color: #487b90;
}

.color-3 {
  background: #eae6f9;
  color: #7b65a6;
}

.avatar {
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  font-weight: 700;
}

.person small,
.table-foot {
  color: #7e8eaa;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  padding: 5px 8px;
  white-space: nowrap;
  line-height: 1.3;
  background: #e6f5ed;
  color: #217d56;
  border-radius: 3px;
  font-weight: 650;
}

.badge.orange {
  background: #fff4ce;
  color: #896719;
}

.badge.neutral {
  background: #edf1f9;
  color: #667c9f;
}

.doc-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: #ad8124;
}

.doc-check.ok {
  color: #288560;
}

.notice {
  display: flex;
  align-items: center;
  border: 1px solid #dfe8d3;
  margin-bottom: 23px;
  background: #edf2ff;
  border-color: #d7e2ff;
  color: #4268c5;
  border-radius: 5px;
}

.notice strong {
  color: #385aab;
  font-weight: 650;
}

.notice p {
  line-height: 1.6;
  margin-top: 5px;
  color: #7288b2;
}

.notice .text-btn {
  color: var(--blue);
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  margin: 20px 0;
  border-color: #dce3f0;
}

.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 12px 2px;
  color: #7d8eaa;
  font-weight: 600;
}

.tabs button.selected {
  border-bottom-color: #47723b;
  font-weight: 600;
  color: var(--blue);
  border-color: var(--blue);
}

.helper {
  font-size: 10px;
  line-height: 1.7;
  display: flex;
  gap: 6px;
  margin: 15px 0;
  align-items: center;
  color: #8090ac;
}

.empty h3 {
  font-size: 14px;
  font-weight: 500;
  color: #4b6592;
}

.empty p {
  font-size: 11px;
  line-height: 1.8;
  max-width: 300px;
  color: #8294b1;
}

.modal {
  height: 100dvh;
  overflow: auto;
  position: relative;
  background: #fff;
  box-shadow: -20px 0 70px #0f1b3a44;
}

.modal .eyebrow {
  color: var(--blue);
}

.modal h2 {
  margin: 15px 0 10px;
  font-weight: 750;
  color: #1b3158;
}

.modal>p {
  font-size: 11px;
  line-height: 1.7;
  margin-bottom: 25px;
  color: #7e8ead;
}

.checkbox input {
  width: 15px;
  height: 15px;
  accent-color: var(--blue);
}

.toast {
  position: fixed;
  bottom: 25px;
  transform: translateX(-50%);
  z-index: 100;
  box-shadow: 0 8px 25px #15352220;
  border: 1px solid #668b49;
  padding: 15px 22px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 90vw;
  background: #12234b;
  border-color: var(--blue);
  color: #fff;
  border-radius: 5px;
}

.toast svg {
  color: var(--yellow);
}

.error {
  border: 1px solid #ecd2c8;
  padding: 13px 16px;
  border-radius: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  background: #fff0ec;
  border-color: #f1d1c4;
  color: #aa5d42;
}

.card-icon.amarelo {
  background: #e5c923;
}

.card-icon.vermelho {
  background: #e15050;
}

nav a.active {
  background: var(--blue);
  color: white;
}

nav a.active:before {
  content: '';
  position: absolute;
  left: -19px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--yellow);
}

.stats a.stat {
  cursor: pointer;
}

.tabs a {
  border-bottom: 2px solid transparent;
  color: #7d8eaa;
  font-size: 11px;
  font-weight: 600;
  padding: 12px 2px;
}

.tabs a.selected {
  color: var(--blue);
  border-color: var(--blue);
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-form input:not([type=submit]) {
  font-size: 12px;
  width: 110px;
  padding: 8px;
}

.inline-form select {
  font-size: 10px;
  width: 155px;
  padding: 8px;
}

.inline-form input[type=submit] {
  width: auto;
}

.form-dialog {
  border: 1px solid #d9e1f4;
  border-radius: 8px;
  box-shadow: 0 30px 100px #101e4655;
  padding: 30px;
  width: 460px;
  max-width: calc(100% - 32px);
  max-height: 90dvh;
  overflow: auto;
  color: #1d355e;
}

.form-dialog::backdrop {
  background: #101e4690;
  backdrop-filter: blur(4px);
}

.form-dialog h2 {
  font-size: 25px;
  margin-bottom: 24px;
}

.form-dialog form[method=dialog] {
  margin-top: 12px;
}

.document-field {
  padding: 14px;
  background: #f3f6fc;
  border-radius: 5px;
  margin: 12px 0;
}

.document-field .checkbox {
  margin: 0 0 10px;
}

.document-field input[type=file] {
  font-size: 10px;
  padding: 8px;
  background: #fff;
}

.modal form>label {
  margin: 18px 0;
}

.modal-backdrop .modal {
  outline: none;
}

.stat svg {
  color: var(--blue);
}

.modal input[type=file] {
  width: 100%;
}

@media (min-width: 1600px) {
  .stat {
    padding: 23px;
  }
}

@media (max-width: 1200px) {
  .stats {
    gap: 12px;
  }

  .stat {
    padding: 16px 13px;
  }

  .stat>div {
    font-size: 9px;
  }

  .stat>strong {
    font-size: 25px;
  }

  .panel-head {
    padding: 20px 16px;
  }

  .panel-head .small {
    display: none;
  }

  .toast {
    left: calc(50% + 100px);
  }

  nav a.active:before {
    left: -15px;
  }
}

@media (max-width: 960px) {
  .stats {
    grid-template-columns: repeat(2,1fr);
  }

  .page-head {
    align-items: flex-start;
  }

  .head-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .page-head .btn {
    padding: 10px;
    font-size: 10px;
  }

  .save-state {
    font-size: 9px;
  }

  .notice {
    flex-wrap: wrap;
  }

  .notice .text-btn {
    margin-left: 32px;
  }

  .toast {
    left: calc(50% + 90px);
  }
}

@media (max-width: 700px) {
  .mobile-menu {
    display: inline-flex;
  }

  .save-state {
    font-size: 0;
  }

  .save-state .dot {
    width: 6px;
    height: 6px;
  }

  .page-head {
    margin-bottom: 23px;
    gap: 13px;
    flex-wrap: wrap;
  }

  .page-head p {
    font-size: 11px;
    line-height: 1.7;
  }

  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.3px;
  }

  .page-head>.btn {
    padding: 12px 14px;
  }

  .stats {
    gap: 10px;
    margin: 16px 0;
  }

  .stat {
    padding: 16px 13px;
  }

  .stat>strong {
    font-size: 28px;
  }

  .stat>small {
    font-size: 8px;
  }

  .stat>div {
    font-size: 9px;
  }

  .panel-head h2 {
    font-size: 13px;
  }

  .panel-foot {
    font-size: 8px;
    padding: 13px;
  }

  .toolbar {
    gap: 8px;
  }

  .toolbar>.search {
    flex-basis: 100%;
  }

  .toolbar>select {
    width: 125px;
    font-size: 10px;
  }

  .notice {
    padding: 14px;
    gap: 9px;
  }

  .notice strong {
    font-size: 10px;
  }

  .notice p {
    font-size: 9px;
  }

  .notice svg {
    flex-shrink: 0;
  }

  .notice>div {
    min-width: 200px;
  }

  .notice .text-btn {
    margin-left: 28px;
    font-size: 9px;
  }

  .modal {
    padding: 35px 22px;
    width: 100%;
    max-width: 500px;
  }

  .modal-backdrop {
    background: #183423aa;
  }

  .modal h2 {
    font-size: 26px;
  }

  .tabs {
    gap: 18px;
  }

  .tabs button {
    font-size: 10px;
  }

  .head-actions {
    justify-content: flex-start;
  }

  .page-head h1 {
    font-size: 29px;
  }

  .toast {
    left: 50%;
    width: max-content;
    max-width: 90vw;
    font-size: 11px;
    bottom: 18px;
    background: #12234b;
  }

  .modal label {
    font-size: 12px;
  }

  .modal input,
  .modal select {
    font-size: 14px;
    padding: 13px;
  }

  .modal .btn {
    font-size: 12px;
  }

  .form-dialog {
    padding: 25px;
  }
}

/* Overrides: these must come after the breakpoints above. */

.eyebrow {
  margin-bottom: 12px;
  color: #5572b4;
  font-size: 9px;
  letter-spacing: 1.7px;
  font-weight: 700;
}

.stat>div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: #697a97;
  font-size: 10px;
}

.stat>strong {
  display: block;
  color: #152647;
  font-size: 31px;
  font-weight: 700;
  letter-spacing: -1.3px;
  margin: 14px 0 9px;
  font-variant-numeric: tabular-nums;
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #223555;
}

.stat {
  display: block;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-color: #e0e5ef;
  border-radius: 6px;
  box-shadow: 0 2px 0 #17244003;
  position: relative;
  padding-top: 19px;
  cursor: default;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: #0e193b99;
  backdrop-filter: blur(4px);
}

@media (max-width: 700px) {
  .stat>strong {
    font-size: 29px;
  }

  .stat>div {
    font-size: 10px;
  }

  .panel-head h2 {
    font-size: 14px;
  }
}

/* Player import preview: every row of the file, editable, with its problems under the cells. */
.import-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.import-preview td {
  padding: 8px 10px;
  vertical-align: top;
}

.import-preview input[type=text] {
  min-width: 110px;
}

.import-preview [aria-invalid=true] {
  border-color: #e15050;
  background: #fff0ec;
}

.import-preview tr.excluded td {
  opacity: .55;
}

.cell-suggested {
  display: block;
  margin-top: 4px;
  color: var(--blue);
  font-size: 11px;
}

.cell-problem {
  display: block;
  max-width: 220px;
  margin-top: 4px;
  color: #aa5d42;
  font-size: 11px;
  white-space: normal;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.import-hint {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

/* A correction form folded into a table row (charges, payments). */
.row-edit form {
  display: grid;
  gap: 6px;
  min-width: 200px;
  margin-top: 6px;
}

tr.muted td {
  opacity: .6;
}
