/* Axis runtime 0.7.0 — functional foundation */
:root {
  --axis-runtime-panel: #101c31;
  --axis-runtime-panel-strong: #14223a;
  --axis-runtime-border: rgba(145, 160, 195, .20);
  --axis-runtime-accent: #7557ff;
  --axis-runtime-accent-2: #506cff;
  --axis-runtime-text: #f5f7ff;
  --axis-runtime-muted: #98a5bf;
}

html::view-transition-old(root),
html::view-transition-new(root) { animation-duration: .18s; }

body.axis-modal-open { overflow: hidden; }

#axis-runtime-modal-root { position: relative; z-index: 10000; }
.axis-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 7, 16, .72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity .18s ease;
}
.axis-modal-backdrop.is-visible { opacity: 1; }
.axis-modal {
  width: min(560px, 100%);
  max-height: min(820px, calc(100dvh - 44px));
  overflow: hidden;
  border: 1px solid rgba(117, 87, 255, .42);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 0%, rgba(117, 87, 255, .18), transparent 32%),
    linear-gradient(145deg, rgba(18, 30, 51, .99), rgba(7, 15, 29, .99));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .58), 0 0 50px rgba(117, 87, 255, .16);
  transform: translateY(12px) scale(.985);
  transition: transform .18s ease;
}
.axis-modal-backdrop.is-visible .axis-modal { transform: translateY(0) scale(1); }
.axis-modal.is-wide { width: min(760px, 100%); }
.axis-modal > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--axis-runtime-border);
}
.axis-modal > header h2 { margin: 0 0 7px; font-size: 22px; letter-spacing: -.02em; }
.axis-modal > header p { margin: 0; color: var(--axis-runtime-muted); font-size: 13px; line-height: 1.5; }
.axis-modal-close {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--axis-runtime-border);
  border-radius: 12px;
  color: #cbd3e6;
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
}
.axis-modal-form { display: flex; min-height: 0; max-height: calc(100dvh - 160px); flex-direction: column; }
.axis-modal-body { min-height: 0; overflow: auto; padding: 22px 24px; }
.axis-modal-form > footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 16px 24px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--axis-runtime-border);
  background: rgba(6, 13, 26, .72);
}
.axis-fields-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.axis-field { display: grid; gap: 8px; min-width: 0; }
.axis-field--full { grid-column: 1 / -1; }
.axis-field > span { color: #dbe1f0; font-size: 12px; font-weight: 700; }
.axis-field input,
.axis-field select,
.axis-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--axis-runtime-border);
  border-radius: 13px;
  outline: 0;
  color: var(--axis-runtime-text);
  background: rgba(5, 12, 24, .78);
  padding: 0 13px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.axis-field textarea { min-height: 92px; resize: vertical; padding-block: 12px; }
.axis-field select { appearance: auto; }
.axis-field input:focus,
.axis-field select:focus,
.axis-field textarea:focus {
  border-color: rgba(117, 87, 255, .8);
  background: rgba(8, 17, 33, .96);
  box-shadow: 0 0 0 4px rgba(117, 87, 255, .13);
}
.axis-check-field {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--axis-runtime-border);
  border-radius: 13px;
  padding: 0 14px;
  color: #dbe1f0;
  background: rgba(255, 255, 255, .025);
}
.axis-check-field input { width: 18px; height: 18px; accent-color: var(--axis-runtime-accent); }
.axis-check-field span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.axis-action-primary,
.axis-action-secondary {
  min-height: 43px;
  border-radius: 12px;
  padding: 0 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 750;
  cursor: pointer;
}
.axis-action-primary {
  border: 1px solid transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--axis-runtime-accent-2), var(--axis-runtime-accent) 58%, #a653ff);
  box-shadow: 0 10px 28px rgba(100, 74, 255, .28);
}
.axis-action-secondary {
  border: 1px solid var(--axis-runtime-border);
  color: #cbd3e6;
  background: rgba(255, 255, 255, .045);
}
.axis-action-primary:hover,
.axis-action-secondary:hover { transform: translateY(-1px); }

#axis-runtime-toasts {
  position: fixed;
  z-index: 11000;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}
.axis-toast {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--axis-runtime-border);
  border-radius: 15px;
  color: var(--axis-runtime-text);
  background: rgba(14, 25, 44, .96);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
}
.axis-toast.is-visible { opacity: 1; transform: translateY(0); }
.axis-toast > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #b6a8ff;
  background: rgba(117, 87, 255, .15);
}
.axis-toast.is-success > span { color: #4de0a8; background: rgba(67, 214, 160, .12); }
.axis-toast.is-error > span { color: #ff8291; background: rgba(255, 101, 119, .12); }
.axis-toast p { margin: 0; font-size: 12px; line-height: 1.4; }

#axis-network-status {
  position: fixed;
  z-index: 9000;
  top: 14px;
  left: 50%;
  display: none;
  grid-template-columns: 9px auto;
  column-gap: 8px;
  align-items: center;
  max-width: calc(100vw - 28px);
  padding: 8px 13px;
  border: 1px solid rgba(255, 182, 77, .35);
  border-radius: 999px;
  color: #f3d7a8;
  background: rgba(38, 27, 13, .93);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .35);
  transform: translateX(-50%);
}
#axis-network-status.is-offline { display: grid; }
#axis-network-status > span { width: 8px; height: 8px; border-radius: 50%; background: #ffb64d; box-shadow: 0 0 10px rgba(255, 182, 77, .8); }
#axis-network-status strong { font-size: 11px; }
#axis-network-status small { grid-column: 2; color: #bba988; font-size: 9px; }

.axis-backup-summary,
.axis-lucy-action {
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 84px;
  border: 1px solid var(--axis-runtime-border);
  border-radius: 16px;
  padding: 16px;
  color: #b9adff;
  background: rgba(117, 87, 255, .08);
}
.axis-backup-summary div,
.axis-lucy-action div { display: grid; gap: 4px; }
.axis-backup-summary strong,
.axis-lucy-action strong { color: var(--axis-runtime-text); font-size: 14px; }
.axis-backup-summary span,
.axis-lucy-action p { margin: 0; color: var(--axis-runtime-muted); font-size: 12px; line-height: 1.45; }
.axis-data-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.axis-data-list li {
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--axis-runtime-border);
  border-radius: 13px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, .025);
}
.axis-data-list li > span { color: #9f8cff; font-size: 18px; text-align: center; }
.axis-data-list li > div { min-width: 0; display: grid; gap: 3px; }
.axis-data-list strong { overflow: hidden; color: #eef2ff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.axis-data-list small { color: var(--axis-runtime-muted); font-size: 10px; }
.axis-data-list b { color: #d9deed; font-size: 12px; white-space: nowrap; }
.axis-empty-state { min-height: 120px; display: grid; place-items: center; color: var(--axis-runtime-muted); text-align: center; }

.axis-local-row { position: relative; }
.axis-local-row::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 3px 0 0 rgba(117, 87, 255, .7);
}
.money-transaction-row__copy small i {
  margin-left: 5px;
  color: #a897ff;
  font-size: .82em;
  font-style: normal;
}
.money-transaction-row__amount .is-transfer { color: #a897ff; }
.money-transaction-row__icon--transfer { color: #a897ff; background: rgba(117, 87, 255, .14); }
.tasks-today-row { cursor: pointer; }
.tasks-today-row.is-axis-complete { opacity: .62; }
.tasks-today-row.is-axis-complete > strong { text-decoration: line-through; }
.tasks-today-row.is-axis-complete .tasks-check {
  display: grid;
  place-items: center;
  color: #071710;
  border-color: #43d6a0;
  background: #43d6a0;
}
.habits-row { cursor: pointer; }
.habits-row.is-axis-complete .habits-row__copy strong { color: #eef2ff; }
.habits-row.is-axis-custom .habits-row__icon { color: #a58cff; }
.health-care__list p { cursor: pointer; }
.health-care__list p.is-axis-complete span { color: #d8deeb; }
.food-meal-card > em {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: #9f8cff;
  font-size: 8px;
  font-style: normal;
}
.axis-home-task-list { display: grid; gap: 8px; margin: 0 0 10px; }
.axis-home-task-list button {
  min-height: 50px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(117, 87, 255, .25);
  border-radius: 13px;
  color: #eef2ff;
  background: rgba(117, 87, 255, .08);
  padding: 8px 12px;
  cursor: pointer;
  text-align: left;
}
.axis-home-task-list button > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: #a996ff; background: rgba(117, 87, 255, .13); }
.axis-home-task-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.axis-home-task-list time { color: var(--axis-runtime-muted); font-size: 10px; }

.axis-local-chat {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 0 4px;
}
.axis-chat-message {
  width: fit-content;
  max-width: min(680px, 86%);
  border: 1px solid var(--axis-runtime-border);
  border-radius: 16px 16px 16px 5px;
  padding: 11px 14px;
  color: #dbe2f1;
  background: rgba(17, 28, 49, .9);
  font-size: 12px;
  line-height: 1.5;
}
.axis-chat-message.is-user {
  justify-self: end;
  border-color: rgba(117, 87, 255, .4);
  border-radius: 16px 16px 5px 16px;
  color: #fff;
  background: linear-gradient(135deg, rgba(80, 108, 255, .6), rgba(117, 87, 255, .68));
}
.settings-card[role="button"] { cursor: pointer; }
.settings-card[role="button"]:focus-visible { outline: 3px solid rgba(84, 183, 255, .35); outline-offset: 2px; }

@media (max-width: 720px) {
  .axis-modal-backdrop { align-items: end; padding: 0; }
  .axis-modal {
    width: 100%;
    max-height: min(88dvh, 820px);
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    transform: translateY(30px);
  }
  .axis-modal.is-wide { width: 100%; }
  .axis-modal > header { padding: 20px 18px 15px; }
  .axis-modal > header h2 { font-size: 20px; }
  .axis-modal-body { padding: 18px; }
  .axis-modal-form > footer { padding: 14px 18px max(14px, env(safe-area-inset-bottom)); }
  .axis-fields-grid { grid-template-columns: 1fr; gap: 13px; }
  .axis-field--full { grid-column: auto; }
  .axis-action-primary,
  .axis-action-secondary { flex: 1 1 auto; padding-inline: 12px; font-size: 12px; }
  #axis-runtime-toasts { right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); }
  .axis-toast { min-height: 52px; }
  .axis-data-list li { grid-template-columns: 26px minmax(0, 1fr); }
  .axis-data-list li > b { grid-column: 2; }
  .axis-chat-message { max-width: 92%; font-size: 11px; }
  .axis-local-chat { margin-inline: 0; }
}

/* Functional affordances added in 0.7.0 without changing the approved layout. */
.health-summary-card,
.health-water,
.health-state {
  cursor: pointer;
}
