.dashboard > h2,
.first-steps > h2,
.invoices > h2,
.my-videos > h2 {
  color: var(--background-light);
  font-size: 1.8rem;
  margin-top: 0;
  padding-top: 1em;
  text-align: center;
  text-transform: uppercase;
}
.dashboard > h2 + p,
.first-steps > h2 + p,
.invoices > h2 + p,
.my-videos > h2 + p {
  color: var(--background-light);
  font-size: 1.4rem;
  line-height: initial;
  margin: 1.2em;
  text-align: center;
}

.dashboard__boxes {
  display: grid;
  gap: 2em 0;
  grid-template-columns: minmax(280px, 32em);
  justify-content: center;
  margin-top: 4em;
}
@media (min-width: 67.5em) {
  .dashboard__boxes {
    grid-template-columns: repeat(2, minmax(auto, 38em));
  }
}
.dashboard__boxes > * {
  margin: 1em;
  position: relative;
}

.dashboard__type {
  margin-left: 3em;
}
.dashboard__type > h3 {
  color: var(--heading);
  font-size: 1.3rem;
  margin: .75em 0 .25em;
  text-transform: uppercase;
}
.dashboard__type::after {
  content: "";
  position: absolute;
  top: 0;
  z-index: -1;
}
.dashboard__boxes > div:nth-child(1) .dashboard__type::after {
  background-color: var(--badge-01);
  left: 6%;
  transform: rotate(6deg);
  width: 86%;
  height: 50%;
}
.dashboard__boxes > div:nth-child(2) .dashboard__type::after {
  background-color: var(--badge-02);
  left: 6%;
  transform: rotate(-4deg);
  width: 55%;
  max-width: 14em;
  height: 50%;
}
.dashboard__boxes > div:nth-child(3) .dashboard__type::after {
  background-color: var(--badge-03);
  left: 6%;
  transform: rotate(4deg);
  width: 86%;
  max-width: 10em;
  height: 50%;
}
.dashboard__boxes > div:nth-child(4) .dashboard__type::after {
  background-color: var(--carnelian);
  left: 6%;
  transform: rotate(4deg);
  width: 86%;
  height: 50%;
}

.dashboard__box {
  background-color: var(--background-lighter);
  border: 1px solid var(--foreground);
  padding: 1em;
}
.dashboard__box table {
  border-collapse: collapse;
}
.dashboard__box table tr:nth-child(2n - 1) {
  background-color: var(--background-light);
}
.dashboard__box table td {
  padding: .25em;
}

.dashboard__data {
  align-items: center;
  display: grid;
  font-size: 1.1rem;
  gap: .5em 1em;
  grid-template-columns: auto 1fr;
}

.dashboard__data .data__label {
  font-size: .9rem;
}
.dashboard__data .data__value {
  background-color: var(--background-lighter);
  display: flex;
  gap: .5em;
  justify-content: space-between;
  mix-blend-mode: multiply;
  padding: .3em;
  word-break: break-word;
}
.dashboard__data .validation-message {
  max-width: 16ch;
}

.green-accent {
  color: limegreen;
  font-weight: bold;
}

.editable {
  cursor: pointer;
}
.editable:focus {
  background-color: var(--background-light);
  outline: none;
}
[data-hint]:focus {
  display: flex;
  flex-direction: column;
}
[data-hint]:focus::before {
  color: red;
  content: attr(data-hint);
  font-size: .9rem;
}
[data-hint]:focus::after {
  display: none;
}
.editable::after {
  content: "\270E";
  display: inline-block;
  opacity: .5;
  transform: scaleX(-1);
}
.editable:hover::after {
  opacity: 1;
}

.dashboard__info {
  margin-block: 2em;
  text-align: right;
}

.cancel-subscription,
.apply-subscription {
  align-items: center;
  background-color: var(--background-light);
  display: flex;
  flex-direction: column;
  margin-top: 2em;
  padding: 1em;
}
.cancel-subscription p,
.apply-subscription p {
  margin-top: 0;
  text-align: left;
}
.cancel-subscription button,
.apply-subscription :is(a, button) {
  background-color: var(--badge-02);
  clip-path: polygon(0 0, 100% 0, 90% 100%, 5% 90%);
  color: var(--main);
  font-family: 'Franklin Sub', sans-serif;
  font-size: 1.1rem;
  padding: .75em .25em;
  text-decoration: none;
  min-width: 8em;
}
@media (min-width: 45em) {
  .cancel-subscription,
  .apply-subscription {
    flex-direction: row;
    gap: 2em;
  }
  .cancel-subscription p,
  .apply-subscription p {
    margin: 0;
  }
}

.narrow {
  max-width: 15em;
}

.dashboard__box > p:first-child {
  line-height: 1.2;
  margin-top: 0;
  text-align: center;
}
.dashboard__box form {
  padding: 0;
}
.dashboard__box fieldset {
  display: grid;
  gap: .5em 0;
  grid-template-columns: auto 1fr;
}
.dashboard__box [type=checkbox] {
  appearance: none;
  background-color: var(--background-light);
  border: none;
  border-radius: 1em;
  cursor: pointer;
  margin-top: .2em;
  padding: .5em;
  position: relative;
  width: 3em;
  height: 1.5em;
  transition: all 200ms ease;
}
.dashboard__box [type=checkbox]:checked {
  background-color: limegreen;
}
.dashboard__box [type=checkbox]:focus-within {
  box-shadow: unset;
}
.dashboard__box [type=checkbox]::before {
  background-color: var(--heading);
  border-radius: 50%;
  content: "";
  position: absolute;
  top: .2em;
  left: .2em;
  width: 1.1em;
  height: 1.1em;
  transform: translate(0);
  transition: all 200ms ease;
}
.dashboard__box [type=checkbox]:checked::before {
  transform: translate(calc(2.75em - (1.8em - .4em)));
}
.dashboard__box input:checked + label {
  color: var(--foreground);
}
.dashboard__box label {
  color: var(--heading);
  cursor: pointer;
  font-family: 'Franklin Sub', sans-serif;
  font-size: 1.3rem;
  line-height: 1;
  margin: 0;
  text-transform: uppercase;
}
.dashboard__box [type=submit] {
  display: block;
  margin: 1.5em auto .5em;
}

@media (min-width: 67.5em) {
  .danger-zone {
    align-self: end;
    justify-self: end;
  }
}
.danger-zone h3 {
  color: white;
}
.danger-zone .dashboard__box {
  overflow: hidden;
  position: relative;
}

.danger-zone .bullet-proof {
  background-color: rgba(32, 32, 32, .25);
  border: 5px inset black;
  cursor: not-allowed;
  display: grid;
  place-items: center;
  position: absolute;
  inset: 0;
}
.danger-zone .bullet-proof.open {
  animation: move-left 2s ease;
  animation-delay: 3s;
  animation-fill-mode: forwards;
  transition: all 500ms ease;
}
.danger-zone .bullet-proof::after {
  color: hsla(46, 88%, 57%, .5);
  content: "\2622";
  filter: drop-shadow(0 0 0 hsla(46, 88%, 37%, .3));
  font-size: 10rem;
  line-height: .9;
  text-shadow: 0 .01em .01em hsla(46, 88%, 37%, .12),
    0 -.01em .01em hsla(46, 88%, 42%, .12),
    .01em 0 .01em hsla(46, 88%, 42%, .12),
    -.01em 0 .01em hsla(46, 88%, 42%, .12);
}
.danger-zone .bullet-proof.open::after {
  animation: rotate 5s ease-in-out;
  animation-delay: 1s;
  animation-fill-mode: forwards;
}
.danger-zone .danger-zone__key {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  position: absolute;
  transform: scale(.7);
}
.danger-zone .danger-zone__key::after {
  animation: pulse 2s linear;
  animation-iteration-count: infinite;
  aspect-ratio: 1;
  background-color: rgba(128, 128, 128, .3);
  border-radius: 50%;
  content: "";
  position: absolute;
  inset: 0;
}
.danger-zone .danger-zone__key:nth-of-type(1) {
  top: 0;
  left: 0;
}
.danger-zone .danger-zone__key:nth-of-type(2) {
  top: 0;
  right: 0;
}
.danger-zone .danger-zone__key:nth-of-type(3) {
  right: 0;
  bottom: 0;
}
.danger-zone .danger-zone__key:nth-of-type(4) {
  bottom: 0;
  left: 0;
}

.danger-zone .dashboard__box p {
  text-align: left;
}
.danger-zone button {
  margin: 0 auto;
  padding: .5em;
}
.danger-zone .dashboard__box small {
  color: var(--foreground);
  cursor: pointer;
  display: block;
  text-align: center;
}
.danger-zone .dashboard__box small:hover {
  color: var(--main);
}

@keyframes move-left {
  from {
    transform: translateX(0);
  } to {
    transform: translateX(-100%);
  }
}

@keyframes rotate {
  20% {
    color: hsla(46, 88%, 57%, .9);
    filter: drop-shadow(.04em 0 .012em hsla(46, 88%, 37%, .3));
    font-size: 11rem;
    transform: rotate(0);
  } 25% {
    transform: rotate(45deg);
  } 100% {
    color: hsla(46, 88%, 57%, .9);
    filter: drop-shadow(.04em 0 .012em hsla(46, 88%, 37%, .3));
    font-size: 11rem;
    transform: rotate(45deg);
  }
}

@keyframes pulse {
  0% {
    opacity: 0;
    transform: scale(.5);
  } 25% {
    opacity: 1;
  } 66% {
    opacity: 0;
    transform: scale(2);
  } 100% {
    opacity: 0;
  }
}

.invoices__table {
  background-color: var(--background-lighter);
  border: 1px solid var(--foreground);
  border-collapse: collapse;
  margin: 0 auto;
  width: 100%;
  max-width: 54em;
}
.invoices__table :is(th, td) {
  padding: 1em;
  text-align: center;
}
.invoices__table td {
  background-image: url(../img/background-bright.png);
}
.invoices__created-at {
  font-weight: bold;
}
.invoices__total {
  font-family: "Franklin Heading", sans-serif;
  font-size: 1.4rem;
}
@media (max-width: 45em) {
  .invoices__table :is(table, thead, tbody, th, td, tr) {
    display: block;
  }
  .invoices__table :is(thead tr) {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  .invoices__table :is(td) {
    padding-block: .5em;
    padding-left: 50%;
    position: relative;
  }
  .invoices__table td:before {
    padding: .5em;
    padding-right: .5em;
    position: absolute;
    top: 0;
    left: 0;
    white-space: nowrap;
  }
  .invoices__table td:nth-of-type(1):before { content: attr(data-date) }
  .invoices__table td:nth-of-type(2):before { content: attr(data-invoicenumber) }
  .invoices__table td:nth-of-type(3):before { content: attr(data-period) }
  .invoices__table td:nth-of-type(4):before { content: attr(data-amount) }
  .invoices__table td:nth-of-type(5):before { content: attr(data-download) }
}

.download {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-top: 0;
}
.download:hover {
  text-decoration: none;
}
.download path {
  fill: var(--background-light);
}
.download:hover path {
  fill: var(--foreground);
}
.download__icon {
  margin-right: .5em;
  width: auto;
  height: 1lh;
}
