:root {
  color-scheme: light;
  --bg: #f7f5fa;
  --surface: #ffffff;
  --surface-soft: #f4f1f8;
  --text: #2b2632;
  --muted: #746d7b;
  --border: #e6e0eb;
  --purple: #7356ed;
  --purple-strong: #6042d7;
  --purple-soft: #eee9ff;
  --coral: #e86e82;
  --mint: #c8f8ec;
  --blue: #6d75e5;
  --shadow: 0 18px 48px rgba(54, 39, 75, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(115, 86, 237, 0.3);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h2 {
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.hidden,
.app-view {
  display: none;
}

.app-view.active {
  display: block;
  animation: view-in 180ms ease;
}

@keyframes view-in {
  from {
    opacity: 0.35;
    transform: translateY(4px);
  }
}

.app-layout {
  min-height: 100vh;
}

.desktop-sidebar {
  display: none;
}

.app-content {
  min-width: 0;
}

.mobile-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: max(10px, env(safe-area-inset-top)) 16px 8px;
  border-bottom: 1px solid rgba(230, 224, 235, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.avatar-button {
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.avatar-button {
  font-size: 0.78rem;
  font-weight: 800;
}

.notification-button {
  position: relative;
  font-size: 1.1rem;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--coral);
}

.view-container {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px 16px 108px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.page-heading .lead {
  max-width: 630px;
  margin-top: 7px;
}

.compact-heading {
  align-items: center;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--purple);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lead,
.panel-heading p,
.message {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 12px;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--purple);
  background: var(--purple);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(115, 86, 237, 0.2);
}

.primary-button:hover {
  border-color: var(--purple-strong);
  background: var(--purple-strong);
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.primary-button:disabled,
.secondary-button:disabled {
  border-color: var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
}

.desktop-action {
  display: none;
}

.next-trip {
  position: relative;
  display: grid;
  width: 100%;
  gap: 24px;
  overflow: hidden;
  padding: 22px;
  text-align: left;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(130deg, #7257ed 0%, #a961dc 58%, #e86e82 100%);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(111, 75, 194, 0.2);
}

.next-trip::after,
.trip-cover::after {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  content: "";
}

.next-trip::after {
  top: -85px;
  right: -55px;
}

.next-trip > * {
  position: relative;
  z-index: 1;
}

.trip-label {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.69rem;
  font-weight: 800;
}

.next-trip h2 {
  margin: 7px 0 5px;
  font-size: 1.5rem;
}

.next-trip p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
}

.next-trip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.77rem;
}

.member-faces {
  display: flex;
}

.member-faces span {
  display: grid;
  width: 29px;
  height: 29px;
  margin-left: -5px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #f5c49e;
  color: #4d3650;
  font-size: 0.58rem;
  font-weight: 850;
}

.member-faces span:first-child {
  margin-left: 0;
}

.member-faces span:nth-child(2) {
  background: #c5e9dd;
}

.member-faces span:nth-child(3) {
  background: #d8c6f5;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-heading {
  margin: 26px 2px 12px;
}

.section-heading span,
.panel-heading > span {
  color: var(--muted);
  font-size: 0.76rem;
}
