html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  padding-bottom: 90px;
}

.app-navbar {
  background: linear-gradient(120deg, #7c4dff, #5e35b1);
}

.app-brand-logo {
  height: 36px;
  width: auto;
}

.app-brand-text {
  font-family: "Story Script";
  font-weight: 400;
}

.app-card {
  border-radius: 20px;
  border: 0;
  box-shadow: 0 12px 24px rgba(28, 16, 62, 0.12);
}

.app-pill {
  border-radius: 999px;
}

.app-hero {
  background: linear-gradient(160deg, #7c4dff, #512da8);
  color: #fff;
  border-radius: 24px;
  padding: 24px;
}

.app-circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 14px solid #e7e2ff;
  position: relative;
  display: grid;
  place-items: center;
}

.app-circle::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 14px solid #34c759;
  transform: rotate(-90deg);
  clip-path: inset(0 0 50% 0);
}

.app-muted {
  color: rgba(255, 255, 255, 0.75);
}

.progress-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-block;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.progress-dot.is-active {
  background-color: #34c759;
}

.progress-dot.is-inactive {
  background-color: #c7c7c7;
}

.profile-header {
  background: linear-gradient(160deg, #7c4dff, #5e35b1);
  color: #fff;
  border-radius: 0 0 28px 28px;
  padding: 32px 24px;
}

.grade-badge,
.grade-circle {
  color: #1f1f1f;
}

.grade-a-plus {
  background-color: #7ed957;
}

.grade-a {
  background-color: #2e8b57;
  color: #fff;
}

.grade-b,
.grade-c {
  background-color: #ffc107;
}

.grade-d,
.grade-fail {
  background-color: #dc3545;
  color: #fff;
}

.report-chart {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(28, 16, 62, 0.1);
}

.report-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.report-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.report-bar-track {
  width: 16px;
  height: 140px;
  border-radius: 999px;
  background: #f2f0f7;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.report-bar-fill {
  width: 100%;
  border-radius: 999px;
  background: #2e8b57;
}

.report-bar-label {
  font-weight: 600;
  color: #6c757d;
}

.report-header {
  background: linear-gradient(135deg, #7c4dff, #512da8);
  color: #fff;
  padding: 10px 12px;
  border-radius: 12px;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(160deg, #7c4dff, #5e35b1);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  justify-content: space-around;
  padding: 8px 12px 10px;
  z-index: 1030;
  box-shadow: 0 -8px 20px rgba(28, 16, 62, 0.08);
}

    .bottom-nav .nav-link {
        color: #fff;
        font-size: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

        .bottom-nav .nav-link.active {
            color: #ffc107;
        }

.bottom-nav .nav-icon {
  width: 22px;
  height: 22px;
}

.app-btn-gradient {
  background: linear-gradient(160deg, #7c4dff, #5e35b1);
  border-color: #5e35b1;
  color: #fff;
}

.app-btn-gradient:hover,
.app-btn-gradient:focus {
  background: linear-gradient(160deg, #6f45e5, #4f2e9a);
  border-color: #4f2e9a;
  color: #fff;
}

.profile-overview-btn {
  border-color: #7c4dff;
  color: #5e35b1;
}

.profile-overview-btn:hover,
.profile-overview-btn:focus {
  background: linear-gradient(160deg, #7c4dff, #5e35b1);
  border-color: #5e35b1;
  color: #fff;
}

.profile-week-link.is-active {
  background: linear-gradient(160deg, #7c4dff, #5e35b1);
  border-color: #5e35b1;
  color: #fff;
}

.profile-week-link.is-active:hover,
.profile-week-link.is-active:focus {
  background: linear-gradient(160deg, #6f45e5, #4f2e9a);
  border-color: #4f2e9a;
  color: #fff;
}

.profile-report-btn {
  border-color: #7c4dff;
  color: #5e35b1;
}

.profile-report-btn:hover,
.profile-report-btn:focus {
  background: linear-gradient(160deg, #7c4dff, #5e35b1);
  border-color: #5e35b1;
  color: #fff;
}

@media (max-width: 767.98px) {
  .app-navbar .container-fluid {
    justify-content: center;
    position: relative;
  }

  .app-navbar .navbar-toggler {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .app-brand {
    width: 100%;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    gap: 0.2rem;
    margin-right: 0;
  }
}

/* iOS standalone keyboard stability helpers */
@supports (-webkit-touch-callout: none) {
  body.ios-standalone input,
  body.ios-standalone textarea,
  body.ios-standalone select {
    font-size: 16px;
  }

  body.ios-standalone.ios-keyboard-open .bottom-nav {
    display: none;
  }

  body.ios-standalone.ios-keyboard-open {
    padding-bottom: 16px;
  }
}
