:root {
  --bg: #10131a;
  --surface: #1a1d24;
  --surface-2: #1d2027;
  --surface-3: #272a31;
  --surface-4: #32353c;
  --line: #424754;
  --text: #e1e2ec;
  --muted: #c2c6d6;
  --faint: #717887;
  --primary: #3b82f6;
  --primary-2: #2563eb;
  --secondary: #4edea3;
  --yellow: #eab308;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgb(84 91 107 / .72) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  min-height: 40px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgb(84 91 107 / .72);
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: rgb(116 124 143 / .86);
  background-clip: padding-box;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body.capacitor-runtime,
body.capacitor-runtime * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.capacitor-runtime::-webkit-scrollbar,
body.capacitor-runtime *::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: max(884px, 100dvh);
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.settings-open {
  overflow: hidden;
}

body[data-font-size="small"] {
  font-size: 13px;
}

body[data-font-size="large"] {
  font-size: 16px;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  background: none;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-small {
  font-size: 18px;
}

.icon-medium {
  font-size: 20px;
}

.icon-filled {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.muted-icon {
  color: var(--muted);
  font-size: 20px;
}

.app-shell {
  min-height: 100dvh;
  padding: 64px 0 calc(72px + var(--safe-bottom));
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid #272a31;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.brand {
  color: white;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  user-select: none;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--primary);
  transition: background-color .15s, transform .15s, opacity .15s;
}

.icon-button:hover {
  background: var(--surface-3);
}

.icon-button:active {
  transform: scale(.95);
  opacity: .85;
}

.profile {
  position: relative;
}

.avatar-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  color: var(--primary);
  background: none;
  display: grid;
  place-items: center;
  transition: background-color .15s, transform .15s, opacity .15s;
}

.avatar-button:hover {
  background: var(--surface-3);
}

.avatar-button:active {
  transform: scale(.95);
  opacity: .85;
}

.avatar-button .material-symbols-outlined {
  font-size: 24px;
}

.profile-button-initial {
  display: none;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(59 130 246 / .36);
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--primary), #4edea3);
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 20px rgb(59 130 246 / .18);
}

.avatar-button.logged-in .material-symbols-outlined {
  display: none;
}

.avatar-button.logged-in .profile-button-initial {
  display: inline-flex;
}

.profile-menu {
  position: absolute;
  top: 48px;
  right: 0;
  width: min(288px, calc(100vw - 32px));
  border: 1px solid #272a31;
  border-radius: 16px;
  background: #13151a;
  box-shadow: 0 24px 48px -12px rgb(0 0 0 / .75);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  overflow: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.profile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-panel {
  display: none;
  flex-direction: column;
}

.profile-panel.active {
  display: flex;
}

.profile-menu-header {
  padding: 16px;
  border-bottom: 1px solid #272a31;
  display: flex;
  align-items: center;
  gap: 16px;
}

.guest-header {
  background: #252525;
  border-color: #2e2e2e;
}

.logged-header {
  background: #181b21;
}

.guest-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid #444;
  border-radius: 12px;
  background: #333;
  color: #d1d5db;
  display: grid;
  place-items: center;
}

.guest-avatar .material-symbols-outlined {
  font-size: 28px;
}

.profile-menu h2 {
  margin: 0;
  color: white;
  font-size: 16px;
  line-height: 22px;
  font-weight: 800;
}

.profile-menu p {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 18px;
}

.guest-cta {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.guest-cta p {
  margin: 0;
  color: #9ca3af;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.profile-primary-button {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  color: white;
  background: var(--primary);
  font-size: 14px;
  font-weight: 800;
  transition: background-color .15s, transform .15s;
}

.profile-primary-button:hover {
  background: var(--primary-2);
}

.profile-primary-button:active {
  transform: scale(.98);
}

.profile-link-list,
.profile-action-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.profile-link-list {
  border-top: 1px solid #2e2e2e;
}

.logged-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgb(59 130 246 / .28);
  border-radius: 999px;
  color: white;
  background: linear-gradient(145deg, var(--primary), #1d4ed8);
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 10px 22px rgb(59 130 246 / .2);
}

.logged-user-copy {
  min-width: 0;
}

.logged-user-copy h2,
.logged-user-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-status-row {
  padding: 8px;
  border-bottom: 1px solid #272a31;
  background: #13151a;
  display: flex;
  gap: 8px;
}

.status-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: .05em;
}

.status-chip .material-symbols-outlined {
  font-size: 14px;
}

.vip-chip {
  color: #ddb7ff;
  border: 1px solid rgb(221 183 255 / .24);
  background: rgb(183 109 255 / .1);
  cursor: default;
  transition: opacity .15s, background-color .15s, border-color .15s, color .15s;
}

body[data-vip="false"] .vip-chip {
  cursor: pointer;
  color: #9ca3af;
  border-color: rgb(156 163 175 / .22);
  background: rgb(156 163 175 / .08);
  opacity: .72;
  filter: grayscale(.55);
}

body[data-vip="false"] .vip-chip:hover {
  color: #ddb7ff;
  border-color: rgb(221 183 255 / .32);
  background: rgb(183 109 255 / .12);
  opacity: 1;
  filter: none;
}

.profile-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 6px;
  color: #d4d7df;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  font-weight: 700;
  transition: background-color .15s, color .15s;
}

.profile-menu-item .material-symbols-outlined {
  color: var(--muted);
  font-size: 20px;
  transition: color .15s;
}

.profile-menu-item:hover {
  color: var(--primary);
  background: #1e2128;
}

.profile-menu-item:hover .material-symbols-outlined {
  color: var(--primary);
}

.profile-divider {
  height: 1px;
  margin: 4px 8px;
  background: #272a31;
}

.danger-menu-item:hover {
  color: #ffb4ab;
  background: rgb(147 0 10 / .2);
}

.danger-menu-item:hover .material-symbols-outlined {
  color: #ffb4ab;
}

.view {
  display: none;
  min-height: calc(100dvh - 136px);
}

.view.active {
  display: flex;
}

.log-view {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.view-heading {
  text-align: center;
  width: 100%;
  max-width: 480px;
  margin-bottom: 48px;
}

.eyebrow {
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.view-title {
  margin: 0;
  color: white;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -.03em;
}

.log-card {
  --entry-accent: var(--primary);
  position: relative;
  width: min(100%, 384px);
  padding: 24px;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--entry-accent) 48%, #272a31);
  border-radius: 24px;
  box-shadow: 0 24px 54px rgb(0 0 0 / .36), 0 0 0 1px color-mix(in srgb, var(--entry-accent) 18%, transparent);
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.log-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  width: calc(100% - 8px);
  height: 4px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, var(--entry-accent), color-mix(in srgb, var(--entry-accent) 45%, transparent), transparent);
}

.duration-ring {
  position: relative;
  width: 192px;
  height: 192px;
  margin: 10px 0 40px;
  border-radius: 999px;
  border: 6px solid #272a31;
  background: var(--bg);
  box-shadow: inset 0 3px 12px rgb(0 0 0 / .35);
  display: grid;
  place-items: center;
}

.duration-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.duration-time {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.duration-time strong {
  color: white;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -.03em;
}

.duration-time span {
  margin-top: 7px;
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.range-control {
  width: 100%;
  position: relative;
  margin-bottom: 18px;
}

.range-control input {
  width: 100%;
  height: 32px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.range-control input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--entry-accent, var(--primary)) var(--progress, 0%), #272a31 var(--progress, 0%));
}

.range-control input::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--entry-accent, var(--primary)) var(--progress, 0%), #272a31 var(--progress, 0%));
}

.range-control input::-webkit-slider-thumb {
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 999px;
  background: radial-gradient(circle at center, white 0 3px, var(--entry-accent, var(--primary)) 4px);
  border: 2px solid var(--surface);
  box-shadow: 0 0 16px color-mix(in srgb, var(--entry-accent, var(--primary)) 55%, transparent);
}

.range-control input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle at center, white 0 3px, var(--entry-accent, var(--primary)) 4px);
  border: 2px solid var(--surface);
  box-shadow: 0 0 16px color-mix(in srgb, var(--entry-accent, var(--primary)) 55%, transparent);
}

.entry-category-field {
  width: 100%;
  margin-bottom: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.entry-category-field .select-shell select {
  min-height: 42px;
  background: rgb(11 14 21 / .82);
}

.category-picker {
  position: relative;
  width: 100%;
  z-index: 1;
}

.category-picker.open {
  z-index: 90;
}

.category-picker-button {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: rgb(11 14 21 / .82);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.category-picker.open .category-picker-button {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.category-picker-value,
.category-picker-option {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
}

.category-picker-value span:last-child,
.category-picker-option span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-picker-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 75;
  max-height: 226px;
  padding: 6px;
  border: 1px solid var(--surface-4);
  border-radius: 10px;
  background: #10131a;
  box-shadow: 0 18px 44px rgb(0 0 0 / .42);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--entry-accent, var(--primary)) 55%, #3f4652) transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .15s, visibility .15s, transform .15s;
}

.category-picker-menu::-webkit-scrollbar {
  width: 6px;
}

.category-picker-menu::-webkit-scrollbar-track {
  background: transparent;
}

.category-picker-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--entry-accent, var(--primary)) 55%, #3f4652);
}

.category-picker-menu::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--entry-accent, var(--primary)) 72%, #525866);
}

.category-picker.open .category-picker-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.language-select {
  z-index: 5;
}

.language-select.open {
  z-index: 95;
}

.category-picker-option {
  width: 100%;
  min-height: 36px;
  padding: 0 9px;
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
  text-align: left;
  transition: background-color .15s, color .15s;
}

.category-picker-option:hover,
.category-picker-option.active {
  color: white;
  background: rgb(59 130 246 / .14);
}

.category-color-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgb(255 255 255 / .08);
}

.category-dot-blue,
.category-bg-blue {
  background: #3b82f6;
}

.category-dot-indigo,
.category-bg-indigo {
  background: #818cf8;
}

.category-dot-green,
.category-bg-green {
  background: #34d399;
}

.category-dot-amber,
.category-bg-amber {
  background: #f59e0b;
}

.category-dot-pink,
.category-bg-pink {
  background: #f472b6;
}

.category-dot-neutral,
.category-bg-neutral {
  background: #71717a;
}

.save-status {
  min-height: 18px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-menu-item {
  display: none;
}

.admin-menu-item.visible {
  display: flex;
}

.button-stack {
  width: 100%;
  display: grid;
  gap: 16px;
}

.primary-button,
.ghost-button {
  width: 100%;
  border-radius: 999px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 800;
  transition: .15s ease;
}

.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  background: var(--entry-accent, var(--primary));
  box-shadow: 0 12px 24px color-mix(in srgb, var(--entry-accent, var(--primary)) 24%, transparent);
}

.primary-button:hover {
  background: color-mix(in srgb, var(--entry-accent, var(--primary)) 84%, white);
}

.ghost-button {
  color: #d4d4d8;
  border: 1px solid #3f4652;
}

.ghost-button:hover {
  color: white;
  background: #272a31;
}

.primary-button:active,
.ghost-button:active {
  transform: scale(.98);
}

.calendar-view {
  flex-direction: column;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #272a31;
}

.month-control {
  display: flex;
  align-items: center;
  gap: 4px;
}

.month-picker-wrap {
  position: relative;
}

.month-picker-button {
  min-width: 148px;
  height: 36px;
  margin: 0 8px;
  padding: 0 10px 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: white;
  background: rgb(29 32 39 / .72);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 800;
  line-height: 24px;
  letter-spacing: -.01em;
  text-align: center;
  transition: background-color .15s, border-color .15s, transform .15s;
}

.month-picker-button:hover,
.month-picker-button[aria-expanded="true"] {
  background: var(--surface-3);
  border-color: #303743;
}

.month-picker-button:active {
  transform: scale(.98);
}

.month-picker {
  position: absolute;
  top: 44px;
  left: 50%;
  z-index: 60;
  width: 286px;
  padding: 14px;
  border: 1px solid var(--surface-4);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 22px 48px rgb(0 0 0 / .42);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.month-picker.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.picker-year-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.picker-year-row strong {
  color: white;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.month-option {
  min-height: 38px;
  border: 1px solid #303743;
  border-radius: 9px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}

.month-option:hover {
  color: white;
  border-color: rgb(59 130 246 / .5);
  background: rgb(59 130 246 / .12);
}

.month-option:active {
  transform: scale(.97);
}

.month-option.active {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}

.tiny-button {
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--muted);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.tiny-button:hover {
  color: white;
  background: var(--surface-3);
  border-color: #303743;
}

.tiny-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.tiny-button:disabled:hover {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.icon-only {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
}

.calendar-grid-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid #272a31;
}

.weekday {
  padding: 10px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.calendar-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(74px, 1fr);
  gap: 1px;
  background: #272a31;
}

.day-cell {
  position: relative;
  background: var(--bg);
  color: var(--text);
  display: block;
  padding: 8px;
  min-width: 0;
  border: 0;
  transition: background-color .15s, box-shadow .15s, transform .15s;
}

.day-cell:hover {
  background: #151a23;
  box-shadow: inset 0 0 0 1px rgb(59 130 246 / .22);
}

.day-cell:focus-visible {
  outline: 2px solid rgb(59 130 246 / .72);
  outline-offset: -2px;
  background: #151a23;
}

.day-cell:active {
  transform: scale(.985);
}

.day-cell.muted {
  color: rgb(194 198 214 / .5);
}

.day-cell.today .day-number {
  color: var(--primary);
}

.day-number {
  position: absolute;
  top: 7px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  color: currentColor;
}

.hours {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.day-category-stack {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  display: grid;
  gap: 3px;
}

.day-category-chip {
  min-width: 0;
  height: 15px;
  padding: 0 5px;
  border-radius: 4px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
}

.day-category-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-category-chip strong {
  flex: 0 0 auto;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.hours.empty {
  color: rgb(194 198 214 / .3);
}

.hours.blue,
.day-number.blue {
  color: var(--primary);
}

.day-cell.selected {
  outline: 1px solid rgb(59 130 246 / .65);
  outline-offset: -1px;
  z-index: 1;
}

.day-cell.pulse {
  animation: datePulse .72s ease-out;
}

@keyframes datePulse {
  0% {
    box-shadow: inset 0 0 0 0 rgb(59 130 246 / .75), 0 0 0 0 rgb(59 130 246 / .35);
    transform: scale(1);
  }

  45% {
    box-shadow: inset 0 0 0 2px rgb(59 130 246 / .9), 0 0 0 8px rgb(59 130 246 / .12);
    transform: scale(.98);
  }

  100% {
    box-shadow: inset 0 0 0 0 rgb(59 130 246 / 0), 0 0 0 14px rgb(59 130 246 / 0);
    transform: scale(1);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgb(4 6 12 / .72);
  backdrop-filter: blur(10px);
}

.modal-backdrop.open {
  display: flex;
}

.modal-panel {
  --entry-accent: var(--primary);
  width: min(100%, 388px);
  position: relative;
  overflow: visible;
  padding: 24px;
  border: 1px solid color-mix(in srgb, var(--entry-accent) 48%, rgb(75 85 99 / .72));
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgb(39 42 49 / .92), rgb(26 29 36)),
    var(--surface);
  box-shadow: 0 30px 80px rgb(0 0 0 / .56);
}

.modal-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  width: calc(100% - 8px);
  height: 4px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, var(--entry-accent), color-mix(in srgb, var(--entry-accent) 55%, transparent), transparent);
}

.modal-panel::after {
  content: "";
  position: absolute;
  top: -110px;
  right: -90px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--entry-accent) 18%, transparent);
  filter: blur(34px);
  pointer-events: none;
}

.modal-panel > * {
  position: relative;
  z-index: 1;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-heading .eyebrow {
  margin-bottom: 10px;
}

.modal-title {
  margin: 0;
  color: white;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.category-detail-panel {
  width: min(100%, 560px);
}

.category-detail-heading .modal-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.category-detail-total {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 800;
}

.category-detail-toolbar {
  margin: 22px 0 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.category-detail-month-nav {
  min-width: 0;
  padding: 4px;
  border: 1px solid var(--surface-4);
  border-radius: 10px;
  background: rgb(11 14 21 / .62);
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 4px;
}

.category-detail-month-nav strong {
  min-width: 0;
  color: white;
  font-size: 13px;
  line-height: 18px;
  font-weight: 900;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-detail-toggle {
  width: 176px;
}

.category-detail-calendar {
  display: grid;
  gap: 8px;
}

.category-detail-weekdays,
.category-detail-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.category-detail-weekdays span {
  color: var(--faint);
  font-size: 10px;
  line-height: 14px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.category-detail-day {
  min-height: 54px;
  padding: 7px 6px;
  border: 1px solid rgb(66 71 84 / .64);
  border-radius: 9px;
  background: rgb(11 14 21 / .58);
  display: grid;
  align-content: space-between;
  gap: 4px;
}

.category-detail-day span {
  color: var(--muted);
  font-size: 11px;
  line-height: 14px;
  font-weight: 900;
}

.category-detail-day strong {
  min-height: 16px;
  color: white;
  font-size: 11px;
  line-height: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.category-detail-day.logged {
  border-color: color-mix(in srgb, var(--category-color, var(--primary)) 54%, var(--line));
  background: color-mix(in srgb, var(--category-color, var(--primary)) 18%, rgb(11 14 21 / .82));
}

.category-detail-day.muted,
.category-detail-day.out-of-range {
  opacity: .34;
}

.category-detail-list {
  max-height: min(46vh, 360px);
  overflow-y: auto;
  display: grid;
  gap: 8px;
}

.category-detail-list[hidden],
.category-detail-calendar[hidden] {
  display: none;
}

.category-detail-list-row {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgb(66 71 84 / .64);
  border-radius: 9px;
  background: rgb(11 14 21 / .58);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-detail-list-row span,
.category-detail-empty span {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 800;
}

.category-detail-list-row strong,
.category-detail-empty strong {
  color: white;
  font-size: 13px;
  line-height: 18px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.category-detail-empty {
  min-height: 130px;
  padding: 22px;
  border: 1px dashed rgb(113 120 135 / .4);
  border-radius: 12px;
  background: rgb(255 255 255 / .025);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  text-align: center;
}

.modal-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  color: var(--muted);
  background: rgb(16 19 26 / .5);
  border: 1px solid rgb(66 71 84 / .62);
}

.modal-value {
  margin: 28px 0 24px;
  padding: 20px;
  border: 1px solid rgb(66 71 84 / .72);
  border-radius: 16px;
  background: rgb(16 19 26 / .58);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .03);
  text-align: center;
}

.modal-value-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.modal-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
}

.modal-time strong {
  color: white;
  font-size: 46px;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.modal-time span {
  color: var(--entry-accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.modal-range {
  margin-bottom: 18px;
  padding: 0 2px;
}

.modal-category-field {
  margin-bottom: 24px;
  position: relative;
  z-index: 5;
}

.modal-category-field .category-picker-menu {
  z-index: 140;
  background: #10131a;
  box-shadow: 0 22px 54px rgb(0 0 0 / .64);
}

.modal-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-actions .primary-button {
  grid-column: 1 / -1;
}

.confirm-backdrop {
  z-index: 160;
}

.confirm-panel {
  width: min(100%, 420px);
}

.confirm-message {
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 22px;
  font-weight: 700;
}

.confirm-actions {
  grid-template-columns: 1fr 1fr;
}

.confirm-actions .primary-button {
  grid-column: auto;
}

.danger-confirm-button {
  background: #e11d48;
  box-shadow: 0 12px 24px rgb(225 29 72 / .22);
}

.danger-confirm-button:hover {
  background: #fb7185;
}

.danger-button {
  color: #fb7185;
}

.danger-button:hover {
  color: white;
  background: rgb(244 63 94 / .16);
  border-color: rgb(244 63 94 / .45);
}

.settings-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
}

.settings-modal.open {
  display: flex;
}

.settings-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: #0b0e15;
  display: flex;
  align-items: center;
}

.settings-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.settings-back-button {
  width: 36px;
  height: 36px;
  color: var(--text);
}

.settings-title-row h1 {
  margin: 0;
  color: white;
  font-size: 24px;
  line-height: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.settings-main {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 48px;
}

.settings-content {
  width: min(100%, 672px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.settings-section-title,
.locked-title > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-title {
  padding: 0 4px;
  color: var(--primary);
}

.settings-section-title h2 {
  margin: 0;
  color: white;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.locked-title {
  justify-content: space-between;
  gap: 12px;
  color: #ddb7ff;
}

.settings-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.settings-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.select-shell,
.input-shell {
  position: relative;
  display: block;
}

.select-shell select,
.input-shell input {
  width: 100%;
  min-height: 42px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: #0b0e15;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}

.select-shell select {
  appearance: none;
  cursor: pointer;
}

.select-shell span,
.input-shell span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  pointer-events: none;
}

.select-shell select:focus,
.input-shell input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.input-shell input::placeholder {
  color: var(--faint);
}

.radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.radio-grid label {
  cursor: pointer;
}

.radio-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.radio-grid span {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #0b0e15;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color .15s, border-color .15s, color .15s;
}

.radio-grid label:hover span {
  border-color: rgb(59 130 246 / .5);
  background: rgb(59 130 246 / .12);
}

.radio-grid input:checked + span {
  color: var(--primary);
  border-color: var(--primary);
  background: rgb(59 130 246 / .18);
}

.category-settings-card {
  gap: 28px;
}

.category-block {
  position: relative;
  display: grid;
  gap: 14px;
}

.category-block-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.category-block-header strong {
  color: white;
  font-size: 14px;
  line-height: 20px;
  font-weight: 900;
}

.category-block-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.category-badge-grid,
.custom-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-badge {
  min-height: 36px;
  max-width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: white;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
}

.category-badge span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.category-blue {
  border-color: rgb(59 130 246 / .36);
  background: rgb(59 130 246 / .16);
}

.category-indigo {
  border-color: rgb(129 140 248 / .36);
  background: rgb(129 140 248 / .16);
}

.category-green {
  border-color: rgb(78 222 163 / .34);
  background: rgb(78 222 163 / .14);
}

.category-amber {
  border-color: rgb(245 158 11 / .38);
  background: rgb(245 158 11 / .16);
}

.category-pink {
  border-color: rgb(244 114 182 / .38);
  background: rgb(244 114 182 / .16);
}

.custom-category-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(116px, 150px) auto;
  gap: 10px;
  align-items: center;
}

.custom-category-form.is-locked {
  opacity: .42;
  filter: grayscale(.8);
}

.category-name-shell input,
.category-color-shell select {
  min-height: 40px;
}

.category-add-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  color: white;
  background: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background-color .15s, transform .15s, opacity .15s;
}

.category-add-button:hover:not(:disabled) {
  background: #60a5fa;
}

.category-add-button:active:not(:disabled) {
  transform: scale(.98);
}

.category-add-button:disabled {
  cursor: not-allowed;
  opacity: .46;
}

.custom-category-row {
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #0b0e15;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.custom-category-row .category-badge {
  border: 0;
  background-color: transparent;
}

.category-delete-button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--muted);
  background: rgb(255 255 255 / .06);
  display: grid;
  place-items: center;
  transition: color .15s, background-color .15s;
}

.category-delete-button:hover:not(:disabled) {
  color: white;
  background: rgb(239 68 68 / .24);
}

.category-delete-button:disabled {
  cursor: not-allowed;
  opacity: .46;
}

.custom-category-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.export-settings-card {
  gap: 14px;
}

.export-option {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b0e15;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.export-option strong,
.category-block-header strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.export-option strong {
  margin-bottom: 3px;
  color: white;
  font-size: 14px;
  line-height: 20px;
  font-weight: 900;
}

.export-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

.export-option .category-add-button {
  min-width: 112px;
}

.export-option .category-add-button:disabled {
  color: var(--muted);
  background: rgb(255 255 255 / .08);
}

.export-vip-note {
  padding: 2px 7px;
  border: 1px solid rgb(221 183 255 / .3);
  border-radius: 999px;
  color: #ddb7ff;
  background: rgb(183 109 255 / .14);
  font-size: 10px;
  line-height: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.export-vip-note.hidden {
  display: none;
}

.export-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

.vip-pill {
  padding: 4px 8px;
  border: 1px solid rgb(221 183 255 / .3);
  border-radius: 999px;
  color: #ddb7ff;
  background: rgb(183 109 255 / .16);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.vip-pill .material-symbols-outlined {
  font-size: 14px;
}

.locked-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
}

.locked-content {
  display: grid;
  gap: 16px;
  opacity: .42;
  filter: grayscale(.75);
  transition: opacity .15s, filter .15s;
}

.locked-card.unlocked .locked-content {
  opacity: 1;
  filter: none;
}

.locked-card.unlocked .lock-overlay {
  display: none;
}

.locked-content p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.theme-swatches {
  display: flex;
  gap: 16px;
}

.theme-swatch {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.theme-swatch:not(:disabled):hover {
  transform: translateY(-1px);
}

.theme-swatch.active {
  border-color: white;
  box-shadow: 0 0 0 2px var(--surface-2), 0 0 0 4px var(--primary);
}

.theme-swatch:disabled {
  cursor: not-allowed;
}

.theme-swatch.blue {
  background: #4d8eff;
}

.theme-swatch.purple {
  background: #b76dff;
}

.theme-swatch.green {
  background: #4edea3;
}

.theme-swatch.coral {
  background: #ffb4ab;
}

.theme-swatch .material-symbols-outlined {
  color: white;
  font-size: 20px;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
  background: rgb(29 32 39 / .68);
  backdrop-filter: blur(2px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.lock-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  display: grid;
  place-items: center;
  color: #ddb7ff;
  box-shadow: 0 8px 24px rgb(0 0 0 / .35);
}

.lock-overlay strong {
  color: white;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.vip-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgb(221 183 255 / .3);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--surface-3), #0b0e15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  box-shadow: 0 16px 42px rgb(0 0 0 / .24);
}

.vip-glow {
  position: absolute;
  top: -96px;
  right: -96px;
  width: 192px;
  height: 192px;
  border-radius: 999px;
  background: rgb(221 183 255 / .1);
  filter: blur(30px);
  pointer-events: none;
}

.vip-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  color: #ddb7ff;
  background: rgb(183 109 255 / .18);
  display: grid;
  place-items: center;
}

.vip-icon .material-symbols-outlined {
  font-size: 28px;
}

.vip-card h2 {
  margin: 0 0 6px;
  color: white;
  font-size: 24px;
  line-height: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.vip-card p {
  max-width: 300px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.vip-button {
  width: min(100%, 260px);
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  color: #490080;
  background: #ddb7ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 12px 26px rgb(183 109 255 / .18);
  transition: background-color .15s, transform .15s;
}

.vip-button:hover {
  background: #f0dbff;
}

.vip-button:active {
  transform: scale(.98);
}

.vip-checkout-card {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid rgb(221 183 255 / .3);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--surface-3), #0b0e15);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 20px 54px rgb(0 0 0 / .42);
}

.vip-checkout-card .vip-button {
  align-self: center;
}

.vip-checkout-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.vip-checkout-header h2 {
  margin: 0 0 4px;
  color: white;
  font-size: 22px;
  line-height: 28px;
  font-weight: 900;
}

.vip-checkout-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.vip-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(16 19 26 / .72);
}

.vip-price-row strong {
  color: white;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
}

.vip-price-row span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.vip-feature-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.vip-feature-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.vip-feature-list .material-symbols-outlined {
  color: #ddb7ff;
  font-size: 18px;
}

.vip-payment-element {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.preferences-card {
  width: min(100%, 576px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preferences-card-title,
.account-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.preferences-card-title .material-symbols-outlined,
.account-section-title .material-symbols-outlined {
  color: var(--primary);
}

.preferences-card-title h2,
.account-section-title h2 {
  margin: 0;
  color: white;
  font-size: 18px;
  line-height: 24px;
  font-weight: 800;
  letter-spacing: -.01em;
}

.preferences-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.density-buttons {
  display: flex;
  gap: 8px;
}

.density-buttons button {
  flex: 1;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #0b0e15;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
  transition: background-color .15s, border-color .15s, color .15s;
}

.density-buttons button:hover {
  color: white;
  background: var(--surface-4);
}

.density-buttons button.active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgb(59 130 246 / .14);
}

.account-content {
  width: min(100%, 896px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.account-page-header h1 {
  margin: 0;
  color: white;
  font-size: 24px;
  line-height: 32px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.account-page-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.account-summary-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(29 32 39 / .62);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-initial {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  border: 4px solid var(--surface);
  border-radius: 999px;
  color: white;
  background: var(--primary);
  display: grid;
  place-items: center;
  font-size: 44px;
  line-height: 1;
  font-weight: 900;
}

.account-summary-card h2 {
  margin: 0;
  color: white;
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
}

.account-summary-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.account-form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.account-wide-field {
  grid-column: 1 / -1;
}

.account-input,
.account-input-with-icon input {
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: var(--bg);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}

.account-input:focus,
.account-input-with-icon input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.account-input[readonly] {
  cursor: not-allowed;
  opacity: .62;
  background: var(--surface-2);
}

.account-input-with-icon {
  position: relative;
  display: block;
}

.account-input-with-icon > .material-symbols-outlined {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 20px;
  pointer-events: none;
}

.account-input-with-icon input {
  padding-left: 42px;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
}

.subscription-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.subscription-status {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 4px 9px;
  border: 1px solid rgb(156 163 175 / .24);
  border-radius: 999px;
  color: #c4c8d2;
  background: rgb(156 163 175 / .08);
  font-size: 11px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.subscription-status.active {
  color: #ddb7ff;
  border-color: rgb(221 183 255 / .28);
  background: rgb(183 109 255 / .14);
}

.subscription-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
}

.subscription-card .account-save-button {
  width: auto;
  min-width: 112px;
  flex: 0 0 auto;
}

.admin-content {
  width: min(100%, 980px);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.admin-tabs {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.admin-tabs button {
  min-height: 38px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-tabs button.active {
  color: white;
  background: var(--primary);
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-filter-bar {
  margin-bottom: 12px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(130px, 170px) minmax(130px, 170px);
  gap: 10px;
}

[data-admin-panel="payments"] .admin-filter-bar {
  grid-template-columns: minmax(240px, 1fr) minmax(150px, 190px);
}

.admin-search-shell input {
  min-height: 40px;
  font-size: 13px;
}

.admin-filter-select {
  position: relative;
  min-width: 0;
  z-index: 2;
}

.admin-filter-select.open {
  z-index: 85;
}

.admin-filter-select .category-picker-button {
  min-height: 40px;
  background: rgb(11 14 21 / .9);
}

.admin-filter-select.open .category-picker-button {
  border-color: rgb(59 130 246 / .72);
  box-shadow: 0 0 0 1px rgb(59 130 246 / .34);
}

.admin-filter-select.open .category-picker-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.admin-filter-select .category-picker-menu {
  max-height: 178px;
  background: #10131a;
  scrollbar-color: color-mix(in srgb, var(--primary) 58%, #3f4652) transparent;
}

.admin-filter-select .category-picker-menu::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--primary) 58%, #3f4652);
}

.admin-filter-select .category-picker-menu::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--primary) 76%, #525866);
}

.admin-filter-select .category-picker-option[aria-selected="true"] {
  color: white;
  background: rgb(59 130 246 / .18);
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-stat-card,
.admin-maintenance-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.admin-stat-card {
  text-align: left;
  transition: border-color .15s, background-color .15s, transform .15s;
}

.admin-stat-card:hover {
  border-color: rgb(59 130 246 / .45);
  background: var(--surface-3);
}

.admin-stat-card:active {
  transform: scale(.99);
}

.admin-stat-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-stat-card strong {
  color: white;
  font-size: 28px;
  line-height: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.admin-table-shell {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: auto;
}

.admin-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.admin-pagination span {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

[data-admin-panel="users"] .admin-table-shell {
  overflow: visible;
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
  line-height: 18px;
}

.admin-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.admin-table td {
  color: var(--text);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-table td strong,
.admin-table td span {
  display: block;
}

.admin-table td span {
  color: var(--muted);
  font-size: 12px;
}

.admin-badge {
  display: inline-flex !important;
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgb(156 163 175 / .22);
  color: #c4c8d2 !important;
  background: rgb(156 163 175 / .08);
  font-size: 11px !important;
  line-height: 16px;
  font-weight: 900;
}

.admin-badge.success {
  color: var(--secondary) !important;
  border-color: rgb(78 222 163 / .24);
  background: rgb(78 222 163 / .1);
}

.admin-badge.vip {
  color: #ddb7ff !important;
  border-color: rgb(221 183 255 / .28);
  background: rgb(183 109 255 / .14);
}

.admin-role-control {
  position: relative;
  width: max-content;
}

.admin-role-button {
  min-height: 30px;
  padding: 0 8px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: white;
  background: rgb(255 255 255 / .06);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .08em;
}

.admin-role-button:hover {
  border-color: rgb(59 130 246 / .42);
  background: rgb(59 130 246 / .12);
}

.admin-role-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 80;
  min-width: 112px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #10131a;
  box-shadow: 0 18px 44px rgb(0 0 0 / .48);
  display: none;
}

.admin-role-menu.open {
  display: grid;
  gap: 3px;
}

.admin-role-menu button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 6px;
  color: var(--text);
  font-size: 11px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: left;
}

.admin-role-menu button:hover:not(:disabled) {
  color: white;
  background: rgb(59 130 246 / .14);
}

.admin-role-menu button:disabled {
  cursor: default;
  color: var(--faint);
}

.admin-row-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  color: #fecdd3;
  background: rgb(244 63 94 / .12);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-row-button:disabled {
  cursor: not-allowed;
  color: var(--faint);
  background: rgb(255 255 255 / .05);
}

.admin-maintenance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.admin-maintenance-card h2 {
  margin: 0 0 6px;
  color: white;
  font-size: 18px;
  line-height: 24px;
}

.admin-maintenance-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.danger-maintenance-card {
  border-color: rgb(244 63 94 / .28);
}

.danger-admin-button {
  color: #fecdd3;
  background: rgb(244 63 94 / .16);
}

.danger-admin-button:hover {
  background: rgb(244 63 94 / .24);
}

.account-save-button {
  min-height: 40px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: var(--surface-4);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background-color .15s, transform .15s;
}

.account-save-button:hover {
  background: var(--surface-bright, #363941);
}

.account-save-button:active {
  transform: scale(.98);
}

.auth-main {
  flex: 1;
  overflow-y: auto;
  padding: 32px 20px 48px;
  display: grid;
  place-items: center;
}

.login-panel,
.signup-panel {
  width: min(100%, 420px);
}

.login-panel {
  width: min(100%, 400px);
}

.auth-brand {
  margin-bottom: 24px;
  text-align: center;
}

.auth-brand .material-symbols-outlined {
  color: var(--primary);
  font-size: 32px;
}

.auth-brand h1 {
  margin: 8px 0 4px;
  color: white;
  font-size: 24px;
  line-height: 32px;
  font-weight: 900;
}

.auth-brand p,
.signup-heading p,
.auth-footer {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 20px 54px rgb(0 0 0 / .44);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgb(59 130 246 / .45), transparent);
}

.signup-card {
  background: var(--surface-2);
}

.signup-heading {
  margin-bottom: 24px;
}

.signup-heading h2 {
  margin: 0;
  color: white;
  font-size: 20px;
  line-height: 28px;
  font-weight: 800;
}

.signup-heading p {
  margin-top: 4px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: .05em;
}

.auth-label-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.auth-label-row button,
.auth-footer button,
.terms-row button {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.auth-label-row button:hover,
.auth-footer button:hover,
.terms-row button:hover {
  color: #adc6ff;
}

.auth-input-shell {
  position: relative;
  display: block;
}

.auth-input-shell > .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--faint);
  font-size: 18px;
  pointer-events: none;
}

.auth-field input,
.auth-input-shell input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: var(--surface-2);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}

.auth-input-shell input {
  padding-left: 36px;
}

.auth-input-shell:has(.password-toggle) input {
  padding-right: 42px;
}

.auth-input-shell.no-leading-icon input {
  padding-left: 12px;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translateY(-50%);
  border-radius: 999px;
  color: var(--muted);
  display: grid;
  place-items: center;
  transition: background-color .15s, color .15s;
}

.password-toggle:hover {
  color: white;
  background: var(--surface-4);
}

.password-toggle .material-symbols-outlined {
  font-size: 18px;
}

.auth-field input::placeholder,
.auth-input-shell input::placeholder {
  color: var(--faint);
}

.auth-field input:focus,
.auth-input-shell input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.auth-primary-button {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
  border-radius: 8px;
  color: white;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: background-color .15s, transform .15s;
}

.auth-primary-button:hover {
  background: var(--primary-2);
}

.auth-primary-button:active {
  transform: scale(.98);
}

.auth-primary-button .material-symbols-outlined {
  font-size: 16px;
}

.auth-footer {
  margin-top: 24px;
  text-align: center;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.terms-row input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.password-panel {
  display: grid;
  gap: 8px;
  margin-top: -6px;
}

.password-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #0b0e15;
}

.password-meter span {
  background: var(--surface-4);
  transition: background-color .2s;
}

.password-strength-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  text-align: right;
}

.password-requirements {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.password-requirements li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.password-requirements li > span:first-child {
  width: 14px;
  flex: 0 0 14px;
  text-align: center;
}

.password-requirements li > span:first-child::before {
  content: "○";
}

.password-requirements li.met {
  color: var(--secondary);
}

.password-requirements li > span:last-child {
  min-width: 0;
  overflow-wrap: normal;
}

.password-requirements li.met > span:first-child::before {
  content: "✓";
}

.password-requirements li.unmet {
  color: #ffb4ab;
}

.password-requirements li.unmet > span:first-child::before {
  content: "×";
}

.auth-status {
  min-height: 18px;
  margin: -4px 0 0;
  color: #ffb4ab;
  font-size: 12px;
  font-weight: 800;
}

.otp-input-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.otp-input-row input {
  min-width: 0;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: white;
  background: var(--bg);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  outline: 0;
}

.otp-input-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.resend-box {
  padding: 12px;
  border-radius: 8px;
  background: rgb(0 0 0 / .22);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.resend-box p {
  margin: 0;
}

.resend-box strong,
.resend-box button {
  color: var(--primary);
  font-weight: 900;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: calc(84px + var(--safe-bottom));
  z-index: 130;
  display: none;
  max-width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  border-left: 4px solid var(--secondary);
  border-radius: 8px;
  color: white;
  background: #181b21;
  box-shadow: 0 14px 32px rgb(0 0 0 / .42);
  font-size: 13px;
  font-weight: 800;
}

.toast.error {
  border-color: #ffb4ab;
  color: #ffb4ab;
}

.reset-card {
  width: min(100%, 448px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 20px 40px rgb(0 0 0 / .4);
}

.reset-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.reset-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-4);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.reset-icon .material-symbols-outlined {
  font-size: 28px;
}

.reset-header h1 {
  margin: 0;
  color: white;
  font-size: 24px;
  line-height: 32px;
  font-weight: 900;
}

.reset-header p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.reset-status {
  min-height: 18px;
  margin: -4px 0 0;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.reset-footer {
  display: flex;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.reset-footer button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition: color .15s;
}

.reset-footer button:hover {
  color: var(--primary);
}

.reset-footer .material-symbols-outlined {
  font-size: 18px;
}

.agreement-main {
  flex: 1;
  overflow-y: auto;
  width: min(100%, 768px);
  margin: 0 auto;
  padding: 96px 20px 64px;
}

.agreement-header {
  margin-bottom: 24px;
}

.agreement-header p {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.agreement-header h1 {
  margin: 0 0 4px;
  color: white;
  font-size: 24px;
  line-height: 32px;
  font-weight: 900;
}

.agreement-header span {
  color: var(--muted);
  font-size: 14px;
}

.agreement-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.agreement-card section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.agreement-card h2 {
  margin: 0;
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  line-height: 24px;
  font-weight: 900;
}

.agreement-card h2 .material-symbols-outlined {
  color: var(--primary);
}

.agreement-card h2 .secondary-icon {
  color: var(--secondary);
}

.agreement-card h3 {
  margin: 0;
  color: white;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .08em;
}

.agreement-card p,
.agreement-card li {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.agreement-card ul {
  margin: 0;
  padding-left: 20px;
}

.agreement-separator {
  height: 1px;
  background: rgb(66 71 84 / .5);
}

.info-main {
  flex: 1;
  overflow-y: auto;
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 96px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-hero,
.info-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
}

.info-hero {
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.info-hero-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 14px;
  color: var(--primary);
  background: rgb(59 130 246 / .12);
  display: grid;
  place-items: center;
}

.info-hero-icon .material-symbols-outlined {
  font-size: 30px;
}

.info-hero p,
.info-card h2 {
  margin: 0;
}

.info-hero p {
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 11px;
  line-height: 16px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.info-hero h1 {
  margin: 0 0 5px;
  color: white;
  font-size: 24px;
  line-height: 30px;
  font-weight: 900;
}

.info-hero span,
.info-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.info-card {
  padding: 18px;
  display: grid;
  gap: 14px;
}

.info-card h2 {
  color: white;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  line-height: 22px;
  font-weight: 900;
}

.info-card h2 .material-symbols-outlined {
  color: var(--primary);
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list article {
  padding: 14px;
  border-radius: 10px;
  background: rgb(11 14 21 / .56);
  display: grid;
  gap: 5px;
}

.faq-list strong,
.support-card strong {
  color: white;
  font-weight: 900;
}

.faq-list p,
.support-card p {
  margin: 0;
}

.info-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.info-feature-grid > span {
  min-height: 44px;
  padding: 10px;
  border-radius: 10px;
  color: var(--text);
  background: rgb(11 14 21 / .56);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
}

.info-feature-grid .material-symbols-outlined {
  color: var(--secondary);
  font-size: 20px;
}

.stats-view {
  flex-direction: column;
  width: min(100%, 768px);
  margin: 0 auto;
  padding: 24px 20px 48px;
  gap: 24px;
}

.stats-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.stats-header .eyebrow {
  margin-bottom: 7px;
}

.stats-title {
  margin: 0;
  color: white;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.stats-month-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--surface-4);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stats-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--surface-4);
  border-radius: 10px;
}

.segmented button {
  flex: 1;
  padding: 9px 8px;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: .05em;
}

.segmented button.vip-locked {
  color: #ddb7ff;
}

.segmented button.vip-locked:hover,
.segmented button.vip-locked:focus-visible {
  background: rgb(183 109 255 / .12);
}

.vip-lock-icon {
  display: none;
  font-size: 14px;
  line-height: 1;
}

.segmented button.vip-locked .vip-lock-icon {
  display: inline-block;
}

.segmented button.active {
  color: white;
  background: var(--primary);
  box-shadow: 0 2px 8px rgb(0 0 0 / .2);
}

.stats-range-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--surface-4);
  border-radius: 10px;
  background: var(--surface-2);
}

.custom-range-controls {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--surface-4);
  border-radius: 12px;
  background: var(--surface-2);
}

.custom-range-controls.open {
  display: grid;
}

.custom-date-field {
  position: relative;
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.custom-date-button {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid #303743;
  border-radius: 9px;
  color: white;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  transition: background-color .15s, border-color .15s, transform .15s;
}

.custom-date-button:hover,
.custom-date-button[aria-expanded="true"] {
  background: #151a23;
  border-color: rgb(59 130 246 / .52);
}

.custom-date-button:active {
  transform: scale(.99);
}

.custom-date-button:focus-visible {
  outline: 2px solid rgb(59 130 246 / .6);
  outline-offset: 1px;
  border-color: var(--primary);
}

.custom-date-picker {
  position: absolute;
  top: 66px;
  left: 0;
  z-index: 62;
  width: min(318px, calc(100vw - 64px));
  padding: 14px;
  border: 1px solid var(--surface-4);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 22px 48px rgb(0 0 0 / .42);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.custom-date-field:last-child .custom-date-picker {
  right: 0;
  left: auto;
}

.custom-date-picker.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.custom-picker-weekdays,
.custom-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.custom-picker-weekdays {
  margin-bottom: 7px;
}

.custom-picker-weekdays span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 800;
  line-height: 24px;
  text-align: center;
  letter-spacing: .08em;
}

.custom-picker-day {
  min-width: 0;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}

.custom-picker-day:hover {
  color: white;
  border-color: rgb(59 130 246 / .45);
  background: rgb(59 130 246 / .12);
}

.custom-picker-day:active {
  transform: scale(.96);
}

.custom-picker-day.muted {
  color: rgb(194 198 214 / .38);
}

.custom-picker-day.today {
  color: var(--primary);
}

.custom-picker-day.selected {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}

.summary-card,
.chart-card,
.category-stats-card {
  background: var(--surface-2);
  border: 1px solid var(--surface-4);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgb(0 0 0 / .18);
}

.stats-output {
  position: relative;
  display: grid;
  gap: 16px;
}

.stats-output.locked .summary-card,
.stats-output.locked .chart-card,
.stats-output.locked .category-stats-card {
  pointer-events: none;
  user-select: none;
  filter: blur(2px) grayscale(.25);
  opacity: .42;
}

.stats-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: none;
  min-height: 100%;
  padding: 24px;
  border: 1px solid rgb(221 183 255 / .32);
  border-radius: 16px;
  background: rgb(16 19 26 / .74);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  align-content: center;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.stats-output.locked .stats-lock-overlay {
  display: grid;
}

.stats-lock-overlay h3 {
  margin: 0 0 6px;
  color: white;
  font-size: 20px;
  line-height: 26px;
  font-weight: 900;
}

.stats-lock-overlay p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 20px;
}

.summary-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.summary-card::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -80px;
  width: 256px;
  height: 256px;
  border-radius: 999px;
  background: rgb(59 130 246 / .1);
  filter: blur(42px);
}

.summary-card > * {
  position: relative;
  z-index: 1;
}

.label {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.total-hours {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.total-hours strong {
  color: var(--primary);
  font-size: 48px;
  line-height: 1.1;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.total-hours span {
  color: var(--muted);
  font-size: 14px;
}

.trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-4);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
  color: var(--secondary);
}

.trend.down {
  color: #fb7185;
}

.trend.neutral {
  color: var(--muted);
}

.trend small {
  color: var(--muted);
  font-weight: 500;
  margin-left: 4px;
}

.chart-card,
.category-stats-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chart-card {
  gap: 14px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  margin: 0;
  color: white;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -.01em;
}

.bar-chart {
  position: relative;
  height: 240px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding-top: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-4);
}

.bar-chart.stats-calendar-chart {
  height: auto;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: stretch;
  justify-content: stretch;
  gap: 1px;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--surface-4);
  border-radius: 10px;
  background: var(--surface-4);
}

.stats-calendar-weekday,
.stats-calendar-day {
  min-width: 0;
  background: var(--surface-2);
}

.stats-calendar-weekday {
  padding: 8px 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

.stats-calendar-day {
  position: relative;
  min-height: 58px;
  padding: 7px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.stats-calendar-day .breakdown-popover {
  bottom: calc(100% + 8px);
}

.stats-calendar-day:has(.breakdown-popover) {
  z-index: 4;
}

.stats-calendar-day.muted {
  opacity: .42;
}

.stats-calendar-day.selected {
  outline: 1px solid var(--primary);
  outline-offset: -1px;
  z-index: 1;
}

.stats-calendar-day-number {
  position: absolute;
  top: 6px;
  left: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.stats-calendar-hours {
  color: white;
  font-size: 12px;
  line-height: 16px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.stats-calendar-hours.empty {
  color: rgb(194 198 214 / .28);
}

.stats-calendar-category-stack {
  position: absolute;
  top: 6px;
  right: 7px;
  display: flex;
  gap: 3px;
}

.stats-calendar-category-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
}

.bar-item {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.breakdown-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 22px);
  z-index: 20;
  width: min(220px, 72vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #10131a;
  box-shadow: 0 18px 44px rgb(0 0 0 / .52);
  transform: translateX(-50%);
}

.breakdown-popover::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #10131a;
  transform: translateX(-50%) rotate(45deg);
}

.breakdown-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.breakdown-header strong {
  color: white;
  font-size: 13px;
  line-height: 18px;
  font-weight: 900;
}

.breakdown-header span {
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
}

.breakdown-list {
  display: grid;
  gap: 8px;
}

.breakdown-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.breakdown-row,
.breakdown-row span {
  min-width: 0;
  display: flex;
  align-items: center;
}

.breakdown-row {
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
}

.breakdown-row span {
  gap: 7px;
}

.breakdown-row span span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breakdown-row strong {
  flex: 0 0 auto;
  color: white;
  font-variant-numeric: tabular-nums;
}

.bar-bg {
  width: 100%;
  flex: 1;
  background: var(--surface-4);
  border-radius: 4px 4px 0 0;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.bar-value {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  opacity: .92;
}

.bar-value.active {
  color: white;
}

.bar {
  width: 100%;
  height: var(--h);
  min-height: 2px;
  background: rgb(59 130 246 / .42);
  border-radius: inherit;
  display: flex;
  flex-direction: column-reverse;
  overflow: hidden;
  transition: background-color .15s, height .2s ease;
}

.bar-category-segment {
  width: 100%;
  min-height: 1px;
}

.bar.active {
  background: var(--primary);
  box-shadow: 0 0 15px rgb(59 130 246 / .3);
  border-top: 2px solid #60a5fa;
}

.bar.gray {
  background: var(--surface-4);
}

.bar-item:hover .bar {
  background: var(--primary);
}

.bar-label {
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
  font-weight: 800;
  letter-spacing: .05em;
}

.bar-label.active {
  color: var(--primary);
}

.chart-footer {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.chart-footer strong {
  color: white;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.category-stats-list {
  display: grid;
  gap: 14px;
}

.category-stat-row {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 8px;
  margin: -8px;
  border-radius: 9px;
  cursor: pointer;
  outline: 0;
  transition: background-color .15s;
}

.category-stat-row:hover,
.category-stat-row:focus-visible,
.category-stat-row.active {
  background: rgb(255 255 255 / .05);
}

.category-stat-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
  line-height: 18px;
  font-weight: 800;
}

.category-stat-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-stat-name span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-stat-topline strong {
  color: white;
  font-variant-numeric: tabular-nums;
}

.category-stat-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-4);
  overflow: hidden;
}

.category-stat-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.category-stats-empty {
  min-height: 168px;
  padding: 24px 18px;
  border: 1px dashed rgb(113 120 135 / .4);
  border-radius: 12px;
  background: rgb(255 255 255 / .025);
  margin: 0;
  color: var(--muted);
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  gap: 8px;
}

.category-stats-empty-icon {
  width: 58px;
  height: 58px;
  color: var(--primary);
  margin-bottom: 2px;
}

.category-stats-empty strong {
  color: white;
  font-size: 14px;
  line-height: 20px;
  font-weight: 900;
}

.category-stats-empty span {
  max-width: 240px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  height: calc(64px + var(--safe-bottom));
  padding: 0 24px var(--safe-bottom);
  background: var(--bg);
  border-top: 1px solid #272a31;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.nav-button {
  min-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 10px;
  color: #71717a;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .15s, background-color .15s, transform .15s;
}

.nav-button .material-symbols-outlined {
  font-size: 22px;
}

.nav-button:hover {
  color: #d4d4d8;
}

.nav-button:active {
  transform: scale(.95);
}

.nav-button.active {
  color: var(--primary);
  background: rgb(59 130 246 / .1);
}

.nav-button.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

@media (min-width: 760px) {
  .calendar-grid {
    grid-auto-rows: minmax(96px, 1fr);
  }

  .bottom-nav {
    justify-content: center;
    gap: 24px;
  }
}

@media (max-width: 520px) {
  .stats-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .stats-month-badge {
    white-space: normal;
  }

  .stats-controls {
    grid-template-columns: 1fr;
  }

  .stats-range-nav {
    justify-content: space-between;
  }

  .custom-range-controls {
    grid-template-columns: 1fr;
  }

  .category-detail-panel {
    padding: 20px;
  }

  .category-detail-toolbar {
    grid-template-columns: 1fr;
  }

  .category-detail-toggle {
    width: 100%;
  }

  .category-detail-day {
    min-height: 48px;
    padding: 6px 4px;
  }

  .category-detail-day strong {
    font-size: 10px;
  }

  .category-block-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .custom-category-form {
    grid-template-columns: 1fr;
  }

  .category-add-button {
    width: 100%;
  }

  .export-option {
    grid-template-columns: 1fr;
  }

  .export-option .category-add-button {
    width: 100%;
  }

  .account-page-header {
    display: none;
  }

  .account-summary-card {
    flex-direction: column;
    text-align: center;
  }

  .account-form-grid {
    grid-template-columns: 1fr;
  }

  .account-actions {
    justify-content: stretch;
  }

  .subscription-card {
    align-items: stretch;
    flex-direction: column;
  }

  .subscription-card .account-save-button {
    width: 100%;
  }

  .admin-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-filter-bar,
  [data-admin-panel="payments"] .admin-filter-bar {
    grid-template-columns: 1fr;
  }

  .admin-pagination {
    justify-content: space-between;
  }

  .admin-maintenance-card {
    align-items: stretch;
    flex-direction: column;
  }

  .account-save-button {
    width: 100%;
  }

  .info-hero {
    flex-direction: column;
  }

  .info-feature-grid {
    grid-template-columns: 1fr;
  }
}
