:root {
  --nail-primary: #9f3c68;
  --nail-primary-dark: #7f2d51;
  --nail-soft: #fff5f9;
  --nail-ink: #3d2931;
  --nail-muted: #806d75;
}

html {
  font-size: 15px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: #fffafb;
  color: var(--nail-ink);
}

.page-loader {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 251, .7);
  backdrop-filter: blur(2px);
}

.page-loader.is-visible {
  display: flex;
}

.page-loader-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  color: var(--nail-primary-dark);
  background: #fff;
  border: 1px solid #eadde2;
  border-radius: .9rem;
  box-shadow: 0 .55rem 1.6rem rgba(90, 45, 63, .14);
  font-weight: 600;
}

.pull-to-refresh {
  display: none;
  position: fixed;
  top: -4.2rem;
  left: 50%;
  z-index: 1100;
  align-items: center;
  gap: .45rem;
  padding: .55rem .8rem;
  color: var(--nail-primary-dark);
  background: #fff;
  border: 1px solid #eadde2;
  border-radius: 2rem;
  box-shadow: 0 .35rem 1rem rgba(90, 45, 63, .14);
  font-size: .78rem;
  font-weight: 600;
  transition: transform .15s ease;
  transform: translate(-50%, -110%);
}

.pull-to-refresh.is-visible {
  display: flex;
}

.pull-to-refresh .spinner-border {
  animation-play-state: paused;
}

.pull-to-refresh.is-ready .spinner-border,
.pull-to-refresh.is-refreshing .spinner-border {
  animation-play-state: running;
}

a {
  color: var(--nail-primary);
}

a:hover {
  color: var(--nail-primary-dark);
}

h1, h2, h3 {
  color: var(--nail-ink);
}

.navbar {
  min-height: 68px;
}

.navbar-brand {
  color: var(--nail-primary) !important;
  font-weight: 700;
}

.brand-icon,
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #b95280, #853156);
  font-weight: 700;
  letter-spacing: .04em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: .75rem;
  font-size: .7rem;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 1rem;
  box-shadow: 0 .5rem 1.5rem rgba(159, 60, 104, .22);
}

.nav-link {
  color: #65545c;
  font-weight: 500;
}

.nav-link:hover {
  color: var(--nail-primary);
}

.nav-link.active {
  color: var(--nail-primary) !important;
  font-weight: 700;
}

.nav-link.active::after {
  display: block;
  width: 100%;
  height: 2px;
  margin-top: .15rem;
  background: var(--nail-primary);
  border-radius: 999px;
  content: "";
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: .7rem;
  font-weight: 600;
  gap: .35rem;
  text-align: center;
}

.btn-primary {
  background: var(--nail-primary);
  border-color: var(--nail-primary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--nail-primary-dark);
  border-color: var(--nail-primary-dark);
}

.form-control,
.form-select {
  min-height: 46px;
  border-color: #eadde2;
  border-radius: .7rem;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: #ce83a4;
  box-shadow: 0 0 0 .2rem rgba(159, 60, 104, .13);
}

.summary-card {
  border: 1px solid rgba(159, 60, 104, .06);
  border-radius: 1rem;
  box-shadow: 0 .35rem 1.3rem rgba(90, 45, 63, .07);
}

.summary-value {
  color: var(--nail-primary);
  font-size: 1.8rem;
  font-weight: 700;
}

.record-card {
  border: 0;
  border-left: .3rem solid #d994b2;
  border-radius: .75rem;
}

.record-card-cancelled {
  opacity: .72;
  border-left-color: #9a8e93;
  background: #fbf8f9;
}

.record-label {
  color: var(--nail-muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.record-title {
  font-size: 1.05rem;
}

.record-value {
  font-size: .9rem;
}

.record-price {
  color: var(--nail-primary-dark);
  font-size: 1.05rem;
  font-weight: 700;
  white-space: nowrap;
}

.record-breakdown {
  padding-top: .65rem;
  border-top: 1px solid #f0e5e9;
  color: #6d5a62;
  font-size: .82rem;
}

.btn-link-danger {
  padding: 0;
  color: #dc3545;
  background: transparent;
  border: 0;
  font: inherit;
  text-decoration: underline;
}

.btn-link-danger:hover,
.btn-link-danger:focus {
  color: #b02a37;
}

.cancel-modal {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 .65rem 2rem rgba(90, 45, 63, .2);
}

.eyebrow {
  color: var(--nail-primary);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.login-page {
  display: grid;
  min-height: 100vh;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(226, 153, 183, .35), transparent 32rem),
    linear-gradient(145deg, #fff9fb, #f9edf2);
  place-items: center;
}

.login-card {
  width: min(100%, 430px);
  border-radius: 1.3rem;
}

.company-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.company-meta div {
  padding: .75rem;
  background: var(--nail-soft);
  border-radius: .75rem;
}

.company-meta span,
.company-meta strong {
  display: block;
}

.company-meta span {
  color: var(--nail-muted);
  font-size: .75rem;
}

.empty-state {
  border-style: dashed;
}

.empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  color: var(--nail-primary);
  background: var(--nail-soft);
  border-radius: 50%;
  font-size: 1.8rem;
  place-items: center;
}

.form-card {
  max-width: 760px;
}

.date-range-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 420px);
  min-height: 58px;
  padding: .65rem .9rem;
  color: var(--nail-ink);
  text-align: left;
  background: #fff;
  border: 1px solid #eadde2;
  border-radius: .85rem;
  box-shadow: 0 .25rem .9rem rgba(90, 45, 63, .06);
}

.date-range-input::after {
  display: none;
}

.date-range-input:hover,
.date-range-input:focus {
  border-color: #ce83a4;
  outline: 0;
}

.date-range-icon {
  color: var(--nail-primary);
  font-size: 1.1rem;
}

.date-range-picker {
  width: min(94vw, 420px);
  border: 1px solid #eadde2;
  border-radius: .9rem;
  box-shadow: 0 .65rem 1.7rem rgba(90, 45, 63, .14);
}

.date-range-picker .btn-sm {
  min-height: 38px;
}

.range-buttons .btn {
  flex: 1 1 auto;
}

.mobile-bottom-nav {
  display: grid;
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1030;
  grid-template-columns: repeat(5, 1fr);
  min-height: 66px;
  padding: .35rem .3rem max(.35rem, env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid #eadde2;
  box-shadow: 0 -.35rem 1.2rem rgba(90, 45, 63, .08);
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
  padding: .25rem .1rem;
  color: #806d75;
  text-align: center;
  text-decoration: none;
}

.mobile-nav-item:hover,
.mobile-nav-item:focus {
  color: var(--nail-primary);
}

.mobile-nav-item.active {
  color: var(--nail-primary);
  font-weight: 700;
}

.mobile-nav-item.active svg {
  stroke-width: 2.25;
}

.mobile-nav-add.active {
  box-shadow: 0 .45rem 1rem rgba(159, 60, 104, .36), 0 0 0 .22rem rgba(159, 60, 104, .16);
  transform: translateY(-.08rem);
}

.mobile-nav-item svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.mobile-nav-item span {
  overflow: hidden;
  max-width: 100%;
  font-size: .66rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-nav-button {
  width: 100%;
  min-height: auto;
  background: transparent;
  border: 0;
}

.mobile-nav-form {
  display: contents;
}

.mobile-nav-add {
  display: grid;
  align-self: start;
  justify-self: center;
  width: 58px;
  height: 58px;
  margin-top: -1.4rem;
  color: #fff;
  background: linear-gradient(135deg, #b95280, #853156);
  border: 4px solid #fffafb;
  border-radius: 50%;
  box-shadow: 0 .45rem 1rem rgba(159, 60, 104, .28);
  text-decoration: none;
  place-items: center;
}

.mobile-nav-add:hover,
.mobile-nav-add:focus {
  color: #fff;
}

.mobile-nav-add span {
  margin-top: -.2rem;
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1;
}

.mobile-more-menu {
  margin-bottom: .5rem !important;
  border-color: #eadde2;
  border-radius: .85rem;
  box-shadow: 0 -.4rem 1.2rem rgba(90, 45, 63, .12);
}

.profile-shell {
  max-width: 920px;
  margin: 0 auto;
}

.profile-nav {
  overflow: hidden;
}

.profile-nav .list-group-item {
  padding: .9rem 1rem;
  color: #65545c;
  border-color: #f0e5e9;
  font-weight: 600;
}

.profile-nav .list-group-item.active {
  color: #fff;
  background: var(--nail-primary);
  border-color: var(--nail-primary);
}

.profile-card {
  max-width: 620px;
}

.audit-table-card {
  overflow: hidden;
}

.audit-table th {
  color: var(--nail-muted);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-table th a {
  color: inherit;
  text-decoration: none;
}

.audit-table td,
.audit-table th {
  padding: 1rem;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .navbar {
    display: none;
  }

  .navbar-collapse {
    padding-bottom: 1rem;
  }

  h1 {
    font-size: 1.7rem;
  }

  .audit-table thead {
    display: none;
  }

  .audit-table,
  .audit-table tbody,
  .audit-table tr,
  .audit-table td {
    display: block;
    width: 100%;
  }

  .audit-table tr {
    padding: .85rem 1rem;
    border-bottom: 1px solid #f0e5e9;
  }

  .audit-table td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .25rem 0;
    text-align: right !important;
    border: 0;
  }

  .audit-table td::before {
    content: attr(data-label);
    color: var(--nail-muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-align: left;
    text-transform: uppercase;
  }
}
