:root{
  --app-header: #485868;
  --app-card:   #F0F0E0;
  --app-input:  #E8F0F8;
  --app-border: #C9C7B3;
  --app-text:   #34332D;
  --app-green:  #82A45B;
  --app-green2: #6E8F4D;
  --app-footer-space: 110px;
}

.app-body{
  color: var(--app-text);
  background: #EEF1F3;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header{
  background: var(--app-header);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.app-user-toggle{
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  max-width: 260px;
}

.app-user-avatar,
.app-user-fallback{
  width: 28px;
  height: 28px;
  border-radius: 999px;
  flex: 0 0 28px;
}

.app-user-avatar{
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.35);
}

.app-user-fallback{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.2);
  color: #fff;
  font-size: .73rem;
  font-weight: 700;
}

.app-user-name{
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-badge{
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--app-green);
  box-shadow: 0 0 0 3px rgba(130,164,91,.25);
}

.app-hero{
  padding: 28px 0 calc(40px + var(--app-footer-space));
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(255,255,255,.55), transparent 55%),
    linear-gradient(180deg, #dfe6ea 0%, #eef1f3 60%, #eef1f3 100%);
  flex: 1 0 auto;
}

.app-card{
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 14px;
}

.app-alert{
  background: rgba(130,164,91,.10);
  border: 1px solid rgba(130,164,91,.25);
  border-radius: 12px;
}

.app-btn{
  background: var(--app-green) !important;
  border-color: var(--app-green) !important;
}

.app-btn:hover{
  background: var(--app-green2) !important;
  border-color: var(--app-green2) !important;
}

.form-control, .form-select{
  background: var(--app-input);
  border-color: rgba(72,88,104,.18);
}
.form-control:focus, .form-select:focus{
  border-color: rgba(130,164,91,.55);
  box-shadow: 0 0 0 .25rem rgba(130,164,91,.20);
}

.app-footer{
  color: rgba(52,51,45,.75);
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: #eef1f3;
  border-top: 1px solid rgba(72,88,104,.14);
}

.app-footer-content{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
}

.app-footer-ig{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: rgba(52,51,45,.85);
  text-decoration: none;
  border: 1px solid rgba(52,51,45,.18);
  border-radius: 999px;
  padding: .22rem .55rem;
  line-height: 1;
}

.app-footer-ig:hover{
  color: rgba(52,51,45,1);
  border-color: rgba(52,51,45,.35);
}

.app-home-visits-card{
  overflow: hidden;
}

.app-home-chart-wrap{
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}

.app-home-chart{
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(22px, 1fr);
  gap: 6px;
  align-items: end;
  height: 130px;
  min-width: 430px;
}

.app-home-chart-col{
  text-align: center;
}

.app-home-chart-bar{
  width: 100%;
}

.app-home-chart-label{
  font-size: .72rem;
  line-height: 1.1;
  white-space: nowrap;
}

@media (min-width: 768px){
  :root{
    --app-footer-space: 86px;
  }

  .app-home-chart{
    min-width: 0;
  }
}

/* Toast popups */
.app-toast-container{
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  width: min(520px, calc(100vw - 24px));
}

.app-toast{
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  overflow: hidden;
  margin-bottom: 10px;
}

.app-toast-header{
  background: var(--app-header);
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff;
}

.app-toast-success{ border-left: 6px solid var(--app-green); }
.app-toast-info{ border-left: 6px solid rgba(72,88,104,.65); }
.app-toast-warning{ border-left: 6px solid #e6b800; }
.app-toast-danger{ border-left: 6px solid #c0392b; }

/* Confirm modal */
.app-modal{
  background: var(--app-card);
  border: 1px solid var(--app-border);
  border-radius: 14px;
}
.app-modal-header{
  background: var(--app-header);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
