
/******************************************************************************/
/* Global Styles */
/******************************************************************************/

@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('/fonts/Figtree-VariableFont_wght.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: italic;
  font-weight: normal;
  font-display: swap;
  src: url('/fonts/Figtree-Italic-VariableFont_wght.ttf') format('truetype');
}


:root {
  --blue: #84b3e1;
  /* Light theme (default) */
  --spinner-color: #3987e6;
  --backdrop-color: #4f555d40;
  --text-color: #333;
  --background-color: #eee;
  --content-background-color: #fff;
  --input-background-color: #eee;
  --input-border-color: #ccc;
  --input-outline-color: #3987e6;
  --input-placeholder-color: #666;
  --button-padding: 10px 18px;
  --button-border-width: 2px;
  --button-border-radius: 6px;
  --button-primary-background-color: #3987e6;
  --button-primary-text-color: #fff;
  --button-secondary-background-color: #fff;
  --button-secondary-text-color: #333;
  --button-secondary-border-color: #333;
  --button-delete-background-color: #d55e5e;
  --button-delete-text-color: #fff;
  --button-delete-border-color: #d55e5e;
  --button-disabled-background-color: #ccc;
  --button-disabled-text-color: #666;
  --link-text-color: #3987e6;
  --toast-info-color: #3987e6;
  --toast-error-color: #d55e5e;
  --toast-success-color: #3bbf90;
  --toast-text-color: #fff;
  --signed-in-as-background-color: #eee;
  --authorize-header-arrow-color: #666;
  --shadow-color: #00000020;
  --behind-shadow-color: #eee;
  --toggle-color: #00000020;
  --border-color: #ccc;
  --accent-color: #3987e6;
  --accent-color-light: #77b4ff;
  --accent-color-indeterminate: #3987e6aa;
  --background-color-gradient: linear-gradient(to right, #fff, #f3f3f3);
  --table-resize-handle-background-color: #3987e680;
  --table-hover-background-color: #00000020;
  --permissionsSelectorTree-line-color: #bbb;
}

/* Dark theme */
.dark {
  --spinner-color: #3987e6;
  --backdrop-color: #13151830;
  --text-color: #eee;
  --background-color: #0d1117;
  --content-background-color: #2e3339;
  --input-background-color: #0d1117;
  --input-border-color: #0d1117;
  --input-outline-color: #3987e6;
  --input-placeholder-color: #aaa;
  --button-padding: 10px 18px;
  --button-border-width: 2px;
  --button-border-radius: 6px;
  --button-primary-background-color: #3987e6;
  --button-primary-text-color: #fff;
  --button-secondary-background-color: #0d1117;
  --button-secondary-text-color: #eee;
  --button-secondary-border-color: #484848;
  --button-delete-background-color: #d55e5e;
  --button-delete-text-color: #fff;
  --button-delete-border-color: #d55e5e;
  --button-disabled-background-color: #666;
  --button-disabled-text-color: #eee;
  --link-text-color: #3987e6;
  --toast-info-color: #3987e6;
  --toast-error-color: #d55e5e;
  --toast-success-color: #3bbf90;
  --toast-text-color: #fff;
  --signed-in-as-background-color: #0d1117;
  --authorize-header-arrow-color: #aaa;
  --shadow-color: #05070a;
  --behind-shadow-color: #2e3339;
  --toggle-color: #ffffff40;
  --border-color: #484848;
  --accent-color: #3987e6;
  --accent-color-light: #77b4ff;
  --accent-color-indeterminate: #3987e6aa;
  --background-color-gradient: linear-gradient(to right, #2e3339, #1c1f24);
  --table-resize-handle-background-color: #3987e680;
  --table-hover-background-color: #ffffff20;
  --permissionsSelectorTree-line-color: #777;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-weight: normal;
  scrollbar-width: thin;
}

html {
  width: 100%;
  height: 100vh;

  color: var(--text-color);
  font-size: 14px;
  font-family: 'Figtree', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.5;
  /* Some weird feature where browsers adjust the size of h1, p, etc. when
  on a mobile browser. Setting this to none fixes the issue... */
  text-size-adjust: none;
  -webkit-text-size-adjust: none;
}
body {
  width: 100%;
  min-height: 100vh;
  margin: 0;

  color: var(--text-color);
  background-color: var(--background-color);
}

/* html, body {
  overflow: hidden;
} */

.app {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
}

/******************************************************************************/
/* header */
/******************************************************************************/
header {
  flex: none;
  display: flex;
  align-items: center;
  padding: 12px;

  border-width: 0 0 1px 0;
  border-image-source: linear-gradient(
    to right,
    transparent 12px,
    rgba(137, 157, 161, .4) 12px,
    rgba(137, 157, 161, 1) 96px,
    rgba(137, 157, 161, 1) calc(100% - 96px),
    rgba(137, 157, 161, .4) calc(100% - 12px),
    transparent calc(100% - 12px)
  );
  border-image-slice: 1;
  border-style: solid;

  transition: padding .2s;
}
  .logo {
    flex: auto;
    display: inline-block;
  }
    .logoImage {
      display: inline-block;
      vertical-align: middle;
      height: 90px;
      width: 90px;

      transition: width .2s, height .2s;
    }
    .logoText {
      display: inline-block;
      vertical-align: middle;
      font-size: 24px;

      transition: font-size .2s;
    }

  header .nav-link {
    padding: 18px;
  }
  .hamburger {
    display: none;
  
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 36px;
    font-weight: bold;
  }

header .profile {
  display: flex;
  justify-content: flex-end;
  padding: 6px;
  
  img {
    height: 36px;
    width: 36px;
    border-radius: 36px;
    cursor: pointer;
  }
}

@media only screen and (max-width: 680px) {
  header .nav-link {
    display: none;
  }
  header .profile {
    display: none;
  }
  header button.hamburger {
    display: block;
  }
}
@media only screen and (max-width: 400px) {
  header .logoImage {
    height: 64px;
    width: 64px;
  }
  header .logoText {
    font-size: 18px;
  }
  header button.hamburger {
    display: block;
  }
}
@media only screen and (max-width: 320px) {
  header {
    padding: 18px;
    border-image-source: linear-gradient(
      to right,
      transparent 18px,
      rgba(137, 157, 161, .4) 18px,
      rgba(137, 157, 161, 1) 64px,
      rgba(137, 157, 161, 1) calc(100% - 64px),
      rgba(137, 157, 161, .4) calc(100% - 18px),
      transparent calc(100% - 18px)
    );
  }
  header .logoText {
    display: none;
  }
}


/******************************************************************************/
/* main */
/******************************************************************************/
main {
  flex: auto;
  width: 100%;
  padding: 12px;

  transition: height .2s, padding .2s;
}
@media only screen and (max-width: 320px) {
  main {
    padding: 18px;
  }
}

/******************************************************************************/
/* footer */
/******************************************************************************/
footer {
  flex: none;
  display: flex;
  padding: 12px;

  border-width: 1px 0 0 0;
  border-image-source: linear-gradient(
    to right,
    transparent 12px,
    rgba(137, 157, 161, .4) 12px,
    rgba(137, 157, 161, 1) 96px,
    rgba(137, 157, 161, 1) calc(100% - 96px),
    rgba(137, 157, 161, .4) calc(100% - 12px),
    transparent calc(100% - 12px)
  ); 
  border-image-slice: 1;
  border-style: solid;

  transition: padding .2s;
}
  footer section {
    flex: auto;
    padding: 0 18px;
  }
    footer .nav-link {
      display: block;
      padding: 8px 0;
    }

@media only screen and (max-width: 680px) {
}
@media only screen and (max-width: 400px) {
  footer {
    flex-direction: column;
  }
}
@media only screen and (max-width: 320px) {
  footer {
    padding: 18px;
    border-image-source: linear-gradient(
      to right,
      transparent 18px,
      rgba(137, 157, 161, .4) 18px,
      rgba(137, 157, 161, 1) 64px,
      rgba(137, 157, 161, 1) calc(100% - 64px),
      rgba(137, 157, 161, .4) calc(100% - 18px),
      transparent calc(100% - 18px)
    );
  }
}

/******************************************************************************/
/* Menu */
/******************************************************************************/
.menu {
  position: fixed;
  height: calc(100% - 70px);
  width: 100%;
  margin-top: 70px;
  padding: 12px 0;
  z-index: 50;
  overflow: auto;

  background-color: var(--content-background-color);

  transition: opacity .2s ease-out, margin-top .2s;
}
.menu .nav-link {
  display: inline-block;
  width: 100%;
  padding: 18px 12px;

  color: var(--text-color);
  font-size: 18px;
  font-weight: bold;
  white-space: nowrap;

  transition: background-color .2s, padding .2s;
}
.menu .nav-link:hover {
  background-color: var(--table-hover-background-color);
}
.menu .nav-link.active {
  color: var(--accent-color);
}

@media only screen and (max-width: 400px) {
  .menu {
    height: calc(100% - 70px);
    margin-top: 70px;
  }
}
@media only screen and (max-width: 320px) {
  .menu {
    height: calc(100% - 70px);
    margin-top: 70px;
    padding: 12px 0;
  }
  .menu .nav-link {
    padding: 10px 12px;
  }
}


/******************************************************************************/
/* Other */
/******************************************************************************/
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

pre {
  font-size: inherit;
  font-family: inherit;
  white-space: pre-wrap;
  white-space: break-spaces;
}

code {
  font-size: 12px;
  font-family: monaco, 'Courier New', monospace;
}

.mono {
  font-family: monaco, 'Courier New', monospace;
}

.no-color,
.no-color:active, .no-color:hover, .no-color:visited {
  color: transparent;
}

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

/******************************************************************************/
/* Images */
/******************************************************************************/
img:hover {
  filter: none !important;
}

/******************************************************************************/
/* Links */
/******************************************************************************/
a {
  text-decoration: none;
  color: var(--text-color);
  outline-color: var(--accent-color);

  transition: color .2s, opacity .2s;
}
a:hover {
  color: var(--link-text-color);
  opacity: .8;
}

/******************************************************************************/
/* Buttons */
/******************************************************************************/
button {
  cursor: pointer;
  font-family: inherit;
  font-weight: inherit;
}

a.primary,
button.primary,
a.secondary,
button.secondary,
button.theme-toggle,
.child-toggle-btn,
.dialog-feeding-log-field-amount-quick-btn,
.home-child-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--button-padding);
  border-width: var(--button-border-width);
  border-style: solid;
  border-radius: var(--button-border-radius);
  font-size: inherit;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background-color .2s, border-color .2s, color .2s, opacity .2s;
}

a.primary,
button.primary {
  border-color: var(--button-primary-background-color);
  background-color: var(--button-primary-background-color);
  color: var(--button-primary-text-color);
}
a.primary:hover,
button.primary:hover {
  opacity: .9;
}

a.secondary,
button.secondary,
button.theme-toggle,
.child-toggle-btn,
.dialog-feeding-log-field-amount-quick-btn,
.home-child-action {
  border-color: var(--button-secondary-border-color);
  background-color: var(--button-secondary-background-color);
  color: var(--button-secondary-text-color);
}
a.secondary:hover,
button.secondary:hover,
button.theme-toggle:hover,
.child-toggle-btn:hover,
.dialog-feeding-log-field-amount-quick-btn:hover,
.home-child-action:hover {
  opacity: .9;
}

button.theme-toggle {
  outline: none;
  border: none;
}
.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-icon svg {
  width: 20px;
  height: 20px;
}

.child-toggle-btn.active {
  border-color: var(--button-primary-background-color);
  background-color: var(--button-primary-background-color);
  color: var(--button-primary-text-color);
}
.child-header-toggle .child-toggle-btn.active {
  border-color: transparent;
  border-bottom-color: var(--accent-color);
  background-color: transparent;
  color: var(--accent-color);
}

button:disabled,
button.primary:disabled,
button.secondary:disabled {
  cursor: not-allowed;
  border-color: var(--button-disabled-background-color);
  background-color: var(--button-disabled-background-color);
  color: var(--button-disabled-text-color);
  opacity: 1;
}

/******************************************************************************/
/* Inputs */
/******************************************************************************/
input, select, textarea {
  padding: 0;
  margin: 0;
  border-radius: 0;

  border: 2px solid var(--input-border-color);
  /* border: 1px solid var(--input-placeholder-color); */
  background-color: transparent;
  color: var(--text-color);
  accent-color: var(--accent-color);
  outline-color: var(--input-outline-color);
  font-size: 14px;
  font-family: inherit;
  /* -webkit-appearance: none; */
}

input[type="checkbox"],
input[type="radio"] {
  width: 24px;
  height: 24px;
  margin-right: 12px;
}
input[type="number"],
input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
select,
textarea {
  padding: 10px;
}

textarea {
  height: 72px;
}


input::placeholder {
  color: var(--input-placeholder-color);
}

input:invalid,
textarea:invalid,
select:invalid {
  /* border: 1px solid var(--toast-error-color); */
  /* background: var(--toast-error-color); */
  /* text-decoration: dashed underline var(--toast-error-color); */
  text-decoration: dashed underline 2px var(--toast-error-color);
  text-underline-offset: 2px; 
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 1;
  color: var(--input-placeholder-color);
  -webkit-text-fill-color: var(--input-placeholder-color);
}

.inputCurrency {
  position: relative;

  & .inputCurrency-sign {
    position: absolute;
    top: 6px;
    padding-left: 10px;
    color: var(--input-placeholder-color);
    pointer-events: none;
  }
  & .inputCurrency-input {
    padding-left: 24px;
  }
}

/******************************************************************************/
/* Lists */
/******************************************************************************/
ul {
  padding-inline-start: 20px;
}

/******************************************************************************/
/* Tables */
/******************************************************************************/
div.table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table .table-pagination {
  flex: none;
  display: flex;
  align-items: center;
}
  .table-pagination-back,
  .table-pagination-forward {
    flex: none;
    font-size: 14px;
    font-weight: 600;
  }
  .table-pagination-info {
    flex: auto;
    padding: 2px;
    text-align: center;
    overflow: auto;
    white-space: nowrap;
  }
    .table-pagination-info-total,
    .table-pagination-info-filtered,
    .table-pagination-info-shown,
    .table-pagination-info-pageSize {
      margin: 0 8px;
    }
    .table-pagination-info-pageSize input {
      padding: 6px;
      border: none;
      border-radius: 6px;
      font-size: inherit;
      font-weight: inherit;
      font-family: inherit;
      background: none;
      color: var(--text-color);
    }

.table .table-content {
  flex: auto;
  overflow: auto;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--background-color-gradient);
  
  box-shadow:
    0 0 6px 1px var(--shadow-color),
    0 0 20px 1px var(--behind-shadow-color);
}

.table table,
table.table {
  /* table-layout: fixed; */
  table-layout: auto;
  border-spacing: 0;
  /* border-collapse: collapse; */
  height: fit-content;
  width: 100%;
  min-width: 800px;
}
table.table {
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 
    0 0 6px 1px var(--shadow-color),
    0 0 20px 1px var(--behind-shadow-color);
}

.table col {
  &.table-hover {
    background: var(--table-hover-background-color);
  }
}

.table tr {
  &:hover {
    background: var(--table-hover-background-color);
  }
}

.table :is(th, td) {
  padding: 6px;
  /* overflow: hidden; breaks the sticky columns */
  overflow: clip;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-align: left;
}
.table th {
  height: 36px;
}

.table tr.table-header {
  position: sticky;
  /* 
  anything that is positon: relative within the table will appear above 
  without this 
  */
  z-index: 1;
  top: 0;
  background: var(--background-color-gradient);

  &.table-hover {
    background: var(--table-hover-background-color);
  }
  &:hover {
    background: var(--table-hover-background-color);
  }

  & :is(th, td) span {
    position: sticky;
    left: 6px;
    font-weight: 600;
  }
}

/* .table-resize {} */
.table .table-resize-handle {
  opacity: 0;
  background: var(--table-resize-handle-background-color);
  touch-action: none;

  &:hover {
    opacity: .4;
  }
}
.table .table-clickable {
  cursor: pointer;
}

.table tr.table-filter {
  position: sticky;
  /* 
  anything that is positon: relative within the table will appear above 
  without this 
  */
  z-index: 1;
  top: 36px;
  background: var(--background-color-gradient);
  
  &.table-hover {
    background: var(--table-hover-background-color);
  }
  &:hover {
    background: var(--table-hover-background-color);
  }
}
.table tr.table-filter :is(th, td) {
  padding: 0;

  &:has(input[type="checkbox"]) {
    padding: 6px;

    & input {
      vertical-align: middle;
      margin-right: 6px;
    }
    & label {
      vertical-align: middle;
      cursor: pointer;
      color: var(--input-placeholder-color);
    }
  }
}
.table tr.table-filter input:not([type="checkbox"]) {
  width: 100%;
  height: 100%;
  padding: 6px;
  border: none;
  /* border-radius: 6px; */
  font-size: inherit;
  font-weight: inherit;
  font-family: inherit;
  background: none;
  color: var(--text-color);
}

.table-actions {
  align-items: center;

  > * {
    margin-right: 6px;
  }
}

/* specific tables */ 
.home-child-table-wrap .table table {
  min-width: 400px;
}

.child .table table {
  min-width: 800px;
  & td:nth-child(1) {
    min-width: 70px;
  }
  & td:nth-child(2) {
    min-width: 100px;
  }
  & td:nth-child(3) {
    min-width: 100px;
  }
  & td:nth-child(4) {
    min-width: 70px;
  }
  & td:nth-child(5) {
    min-width: 60px;
  }
  & td:nth-child(6) {
    min-width: 60px;
  }
  & td:nth-child(7) {
    min-width: 400px;
    text-wrap: wrap;
  }
  & td:nth-child(8) {
    min-width: 130px;
  }
}

/******************************************************************************/
/* Toast List */
/******************************************************************************/
.toast-list {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 50%;
  height: max-content;
  width: 95%;
  max-width: 800px;
  transform: translate(-50%, 0);
}

.toast {
  display: flex;
  align-items: center;
  margin: 12px 0;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 
    0 6px 8px 1px var(--shadow-color),
    0 6px 80px 1px var(--behind-shadow-color);
  color: var(--toast-text-color);
}
.toast.info {
  background-color: var(--toast-info-color);
}
.toast.error {
  background-color: var(--toast-error-color);
}
.toast.success {
  background-color: var(--toast-success-color);
}
.toast-message {
  flex: auto;
  overflow: auto;
  font-family: inherit;
}
.toast-close {
  flex: none;
  margin-left: 6px;
  font-weight: 600;
  cursor: pointer;
}

/******************************************************************************/
/* Dialog */
/******************************************************************************/
.dialogbackdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: transparent;
  backdrop-filter: blur(0px);
  pointer-events: all;
  transition:
    background-color .3s ease,
    backdrop-filter .3s ease,
    color .3s ease,
    border-color .3s ease,
    box-shadow .3s ease,
    opacity .3s ease,
    display .3s ease allow-discrete;
}

.dialogbackdrop.dialogopen {
  display: block;
  background-color: var(--backdrop-color);
  backdrop-filter: blur(2px);
  @starting-style {
    background-color: transparent;
    backdrop-filter: blur(0px);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.dialog {
  position: static;
  transform: translateY(-50%);
  margin: 50vh auto;
  width: max-content;
  opacity: 0;
  border: none;
  border-radius: 12px;
  background: var(--content-background-color);
  color: var(--text-color);
  box-shadow:
    0 25px 50px -12px var(--shadow-color),
    0 25px 120px -12px var(--behind-shadow-color);
  transition:
    background-color .3s ease,
    color .3s ease,
    border-color .3s ease,
    box-shadow .3s ease,
    opacity .3s ease;

  .dialogopen & {
    opacity: 1;
    @starting-style {
      opacity: 0;
    }
  }

  &.spinner {
    transform: none;
    height: 64px;
    width: 64px;
    background: transparent;
    box-shadow: none;
    border-top: 3px solid var(--spinner-color);
    border-right: 3px solid transparent;
    border-radius: 50%;
    animation: spin 500ms linear infinite;
  }
}

/******************************************************************************/
/* Dialog Confirm */
/******************************************************************************/
.dialog-confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 18px;
  max-width: 90vw;
  color: var(--text-color);
  background-color: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.dialog-confirm-title {
  font-size: 18px;
  font-weight: 600;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-align: center;
}
.dialog-confirm-message {
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-align: center;
  line-height: 1.4;
}
.dialog-confirm-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/******************************************************************************/
/* Dialog Account */
/******************************************************************************/
.dialog-account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 18px;
  color: var(--text-color);
  background-color: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.dialog-account-image {
  & img {
    height: 120px;
    width: 120px;
    border-radius: 50%;
    box-shadow:
      0 0 6px 1px var(--shadow-color),
      0 0 20px 1px var(--behind-shadow-color);
  }
}
.dialog-account-name,
.dialog-account-username {
  text-align: center;
  font-size: 18px;
  font-weight: 600;
}
.dialog-account-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/******************************************************************************/
/* Dialog Feeding Log */
/******************************************************************************/
.dialog-feeding-log {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  color: var(--text-color);
  background-color: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.dialog-feeding-log-title {
  font-size: 18px;
  font-weight: 600;
}
.dialog-feeding-log-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-feeding-log-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dialog-feeding-log-field label {
  font-size: 14px;
  font-weight: 500;
}
.dialog-feeding-log-field input {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: inherit;
}
.dialog-feeding-log-field-amount {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dialog-feeding-log-field-amount input {
  flex: 1;
  min-width: 0;
}
.dialog-feeding-log-field-suffix {
  flex: none;
  font-size: 14px;
  color: var(--text-color);
}
.dialog-feeding-log-field-amount-quick {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.dialog-feeding-log-field-amount-quick-btn {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.dialog-feeding-log-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/******************************************************************************/
/* Dialog Diaper Log */
/******************************************************************************/
.dialog-diaper-log {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  color: var(--text-color);
  background-color: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.dialog-diaper-log-title {
  font-size: 18px;
  font-weight: 600;
}
.dialog-diaper-log-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-diaper-log-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dialog-diaper-log-field label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.dialog-diaper-log-field input[type="datetime-local"] {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: inherit;
}
.dialog-diaper-log-field input[type="checkbox"] {
  width: auto;
  margin: 0;
}
.dialog-diaper-log-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/******************************************************************************/
/* Dialog Sleep Log */
/******************************************************************************/
.dialog-sleep-log {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  color: var(--text-color);
  background-color: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.dialog-sleep-log-title {
  font-size: 18px;
  font-weight: 600;
}
.dialog-sleep-log-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-sleep-log-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dialog-sleep-log-field label {
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.dialog-sleep-log-field input[type="datetime-local"] {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: inherit;
}
.dialog-sleep-log-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: inherit;
  min-height: 60px;
  resize: vertical;
}
.dialog-sleep-log-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/******************************************************************************/
/* Dialog Child */
/******************************************************************************/
.dialog-child {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  color: var(--text-color);
  background-color: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.dialog-child-title {
  font-size: 18px;
  font-weight: 600;
}
.dialog-child-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-child-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dialog-child-field label {
  font-size: 14px;
  font-weight: 500;
}
.dialog-child-field input {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: inherit;
}
.dialog-child-dropzone {
  min-height: 120px;
}
.dialog-child-preview {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--border-color);
  object-fit: cover;
}
.dialog-child-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/******************************************************************************/
/* Dialog Share Child */
/******************************************************************************/
.dialog-share-child {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 90%;
  padding: 18px;
  color: var(--text-color);
  background-color: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}
.dialog-share-child-title {
  font-size: 18px;
  font-weight: 600;
}
.dialog-share-child-note {
  font-size: 13px;
  color: var(--input-placeholder-color);
  line-height: 1.4;
  margin-top: -8px;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}
.dialog-share-child-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dialog-share-child-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dialog-share-child-field label {
  font-size: 14px;
  font-weight: 500;
}
.dialog-share-child-field input {
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: inherit;
}
.dialog-share-child-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/******************************************************************************/
/* Home */
/******************************************************************************/

.home-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.home-header h2 {
  flex: none;
  font-size: 18px;
  font-weight: 600;
  margin-right: 8px;
}
.home-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-empty {
  padding: 48px 24px;
  text-align: center;
  background: var(--content-background-color);
  border-radius: 8px;
  border: 1px dashed var(--border-color);
}
.home-empty-message {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-color);
}

.home-child-table-wrap {
  margin-top: 24px;
}
.home-child-table-image {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--border-color);
}
.home-child-table-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.child-header-row-1 {
  display: flex;
  align-items: center;
  gap: 16px;
}
.child-header-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--border-color);
  flex-shrink: 0;
}
.child-header-image img {
  flex: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.child-header-name {
  flex: none;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-color);
}
.child-header-toggle {
  flex: auto;
  justify-content: end;
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-bottom: -1px;
  /* border-bottom: 1px solid var(--border-color); */
}
.child-header-toggle .child-toggle-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--input-placeholder-color);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.child-header-toggle .child-toggle-btn:hover {
  color: var(--text-color);
}
.child-header-toggle .child-toggle-btn.active {
  color: var(--accent-color);
  background: transparent;
  border-bottom-color: var(--accent-color);
  font-weight: 600;
}

.child-logs-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.child-toggle-btn {
  cursor: pointer;
}
.child-screen {
  margin-top: 16px;
}
.child-screen-logs .child-screen-dashboard-panel {
  display: none;
}
.child-screen-dashboard .child-screen-logs-panel {
  display: none;
}
.child-dashboard-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.child-dashboard-tile {
  padding: 20px;
  background: var(--content-background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 1px 3px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.child-dashboard-tile-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--input-placeholder-color);
}
.child-dashboard-tile-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
}
.child-dashboard-tile-chart {
  grid-column: span 2;
  min-width: 320px;
}
.child-dashboard-tile-chart-container {
  min-height: 140px;
  width: 100%;
}
.child-dashboard-tile-chart-container svg {
  display: block;
  max-width: 100%;
}

.home-child-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.home-child-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  background: var(--content-background-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px var(--shadow-color);
}
.home-child-card-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.home-child-card-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--border-color);
}
.home-child-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.home-child-card-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.home-child-card-birthdate {
  font-size: 14px;
  color: var(--text-color);
  opacity: 0.9;
}
.home-child-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  width: 100%;
}
.home-child-action {
  min-width: 36px;
  cursor: pointer;
}

@media only screen and (max-width: 1050px) {
  .home {
    width: calc(718px - 72px);
  }
}
@media only screen and (max-width: 718px) {
  .home {
    width: 100%;
  }
}