:root {
  --bg: #060607;
  --panel: #111218;
  --text: #f6f7fb;
  --muted: #9fa3b3;
  --cyan: #1de9b6;
  --lime: #c6ff00;
  --orange: #ff7b00;
  --pink: #ff2f92;
  --red: #ff4d6d;
  --shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg);
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 47, 146, 0.16), transparent 25%),
    radial-gradient(circle at 90% 20%, rgba(29, 233, 182, 0.18), transparent 30%),
    linear-gradient(145deg, #020203 20%, #0d1018 80%);
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

body.modal-open {
  overflow: hidden;
}

body.mobile-sidebar-open {
  overflow: hidden;
}

#ambient-emoji-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.ambient-emoji {
  position: absolute;
  filter: saturate(0.95) brightness(0.64) blur(0.08px);
  text-shadow: 0 0 20px rgba(0, 0, 0, 0.42);
  mix-blend-mode: screen;
  will-change: transform, opacity;
  animation-name: ambient-float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.ambient-emoji--far {
  filter: saturate(0.84) brightness(0.52) blur(0.18px);
}

.ambient-emoji--mid {
  filter: saturate(1) brightness(0.7) blur(0.05px);
}

h1,
h2,
button {
  font-family: "Space Grotesk", sans-serif;
}

.app-shell {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 2;
}

.layout-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.mobile-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1px solid rgba(29, 233, 182, 0.5);
  background: linear-gradient(135deg, rgba(11, 17, 30, 0.94), rgba(10, 14, 24, 0.9));
  color: #dffef5;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.32);
}

.sidebar-mobile-backdrop {
  display: none;
}

.content-column {
  display: grid;
  gap: 16px;
}

.panel {
  background: linear-gradient(160deg, rgba(23, 26, 34, 0.92), rgba(11, 12, 17, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin-top: 0;
}

.sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.sidebar-title {
  margin: 0;
}

.sidebar-subtitle {
  margin: 0;
  font-size: 1.08rem;
  color: #eff4ff;
}

.sidebar-user {
  margin: 0;
  color: #d3e2ff;
  font-size: 1.02rem;
  line-height: 1.4;
  min-width: 0;
}

.user-email-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(29, 233, 182, 0.42);
  background: rgba(29, 233, 182, 0.12);
  color: #d9fff4;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sidebar-nav-section,
.sidebar-profiles-section {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(150deg, rgba(9, 14, 24, 0.88), rgba(6, 8, 14, 0.94));
}

.sidebar-user-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.sidebar-user-label {
  margin: 0;
  color: #d3e2ff;
  font-size: 1.02rem;
  line-height: 1.3;
}

.sidebar-nav-actions {
  display: grid;
  gap: 8px;
}

.sidebar-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 48px;
  min-height: 48px;
  padding: 11px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.24);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.sidebar-btn-link {
  text-decoration: none;
}

.sidebar-btn-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.sidebar-btn-link.btn-secondary {
  color: #070708;
}

.sidebar-btn-link.btn-ghost {
  color: #fff;
}

.profile-create-box {
  display: grid;
  gap: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(8, 12, 20, 0.92), rgba(7, 9, 16, 0.9));
  padding: 10px;
}

.profile-create-label {
  margin: 0;
  font-size: 1.08rem;
  color: #eff4ff;
}

.profile-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.profile-create-form input {
  min-width: 0;
}

.profile-create-form button {
  white-space: normal;
  width: 100%;
}

.sidebar-link {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 700;
}

.sidebar-link:hover {
  text-decoration: underline;
}

.profile-list {
  display: grid;
  gap: 10px;
  padding: 6px 12px 10px 6px;
  margin: -6px -12px -10px -6px;
}

.profile-list + .profile-create-box {
  margin-top: 8px;
}

.profile-card {
  position: relative;
  background: rgba(9, 10, 15, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, background 0.2s ease;
}

.profile-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(29, 233, 182, 0);
  transition: box-shadow 0.2s ease;
  pointer-events: none;
}

.profile-card:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 233, 182, 0.35);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(29, 233, 182, 0.16);
  background: rgba(11, 14, 22, 0.92);
}

.profile-card:hover::after {
  box-shadow: inset 0 0 0 1px rgba(29, 233, 182, 0.22);
}

.profile-card:focus-visible {
  outline: 2px solid rgba(29, 233, 182, 0.75);
  outline-offset: 2px;
}

.profile-card.active {
  border-color: #89ffdf;
  box-shadow:
    0 0 0 2px rgba(29, 233, 182, 0.84),
    0 0 0 5px rgba(29, 233, 182, 0.25),
    0 20px 34px rgba(0, 0, 0, 0.38),
    0 0 34px rgba(29, 233, 182, 0.42);
}

.profile-card.active::after {
  box-shadow: inset 0 0 0 1px rgba(196, 255, 240, 0.74);
}

.profile-card.ovulation-now {
  border-color: rgba(255, 162, 107, 0.86);
  background:
    radial-gradient(circle at 90% 14%, rgba(255, 123, 0, 0.18), transparent 44%),
    linear-gradient(150deg, rgba(17, 10, 8, 0.9), rgba(12, 10, 16, 0.94));
  box-shadow: 0 0 0 1px rgba(255, 162, 107, 0.28), 0 0 24px rgba(255, 123, 0, 0.2);
}

.profile-card.ovulation-now::after {
  box-shadow: inset 0 0 0 1px rgba(255, 188, 131, 0.34);
}

.profile-card.ovulation-now.active {
  border-color: rgba(255, 214, 173, 0.98);
  box-shadow:
    0 0 0 2px rgba(255, 214, 173, 0.94),
    0 0 0 5px rgba(29, 233, 182, 0.26),
    0 22px 36px rgba(0, 0, 0, 0.42),
    0 0 36px rgba(255, 123, 0, 0.48),
    0 0 46px rgba(29, 233, 182, 0.3);
}

.profile-card.ovulation-now.active::after {
  box-shadow: inset 0 0 0 1px rgba(255, 230, 206, 0.82);
}

.profile-card.active .profile-main-btn {
  border-color: rgba(167, 255, 231, 0.7);
  background: rgba(29, 233, 182, 0.1);
}

.profile-card.ovulation-now.active .profile-main-btn {
  border-color: rgba(255, 223, 195, 0.82);
  background: rgba(255, 166, 95, 0.16);
}

.profile-ovulation-badge {
  margin: 0;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 197, 145, 0.7);
  background: linear-gradient(130deg, rgba(255, 123, 0, 0.27), rgba(255, 47, 146, 0.2));
  color: #fff0e2;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.profile-main-btn {
  text-align: left;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 10px;
}

.profile-main-btn,
.profile-actions button,
.profile-create-form button {
  min-height: 42px;
  font-size: 0.96rem;
  line-height: 1.2;
  font-family: "Space Grotesk", sans-serif;
}

.profile-actions button {
  padding: 9px 10px;
}

.profile-main-btn:hover {
  transform: none;
  filter: none;
  border-color: var(--cyan);
}

.profile-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.hero {
  background: linear-gradient(120deg, rgba(255, 123, 0, 0.2), rgba(29, 233, 182, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.hero-centered {
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.hero p {
  margin: 8px 0 0;
  color: var(--muted);
}

.hero-result {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.profile-subtitle {
  margin: 0;
}

.brand-subtitle {
  margin: 0;
  color: #9debd8;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(0.95rem, 1.8vw, 1.08rem);
  font-weight: 700;
}

.ovulation-focus {
  display: grid;
  gap: 5px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 123, 0, 0.5);
  background: linear-gradient(145deg, rgba(255, 123, 0, 0.22), rgba(255, 47, 146, 0.18));
}

.focus-label {
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--lime);
}

.focus-main {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.1rem, 2.6vw, 2rem);
  font-weight: 700;
}

.focus-sub {
  color: var(--muted);
}

.input-panel,
.params-panel {
  position: relative;
  overflow: hidden;
}

.input-panel::before,
.params-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    radial-gradient(circle at 9% 12%, rgba(255, 123, 0, 0.2), transparent 36%),
    radial-gradient(circle at 88% 16%, rgba(29, 233, 182, 0.18), transparent 34%),
    linear-gradient(160deg, transparent 30%, rgba(255, 47, 146, 0.1) 100%);
  filter: saturate(1.12);
}

.input-panel > *,
.params-panel > * {
  position: relative;
  z-index: 1;
}

.input-panel h2,
.params-panel h2 {
  margin-bottom: 12px;
}

.input-panel .grid-form,
.params-panel .grid-form {
  gap: 12px;
}

.input-panel .actions-row button,
.params-panel .actions-row button {
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.28);
}

.row-form {
  display: flex;
  gap: 8px;
}

.row-form input {
  flex: 1;
}

.grid-form {
  display: grid;
  gap: 10px;
}

.compact-form {
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
}

.events-panel .compact-form {
  margin-top: 14px;
  border-top-color: rgba(255, 255, 255, 0.14);
  background: rgba(4, 7, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
}

.grid-form label,
.params-box label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.params-box {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
  background: linear-gradient(140deg, rgba(5, 8, 15, 0.84), rgba(7, 10, 18, 0.58));
}

.params-box legend {
  color: var(--lime);
  padding: 0 6px;
}

.params-form {
  gap: 16px;
}

.params-intro {
  margin: 0;
  color: var(--lime);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.06rem;
}

.params-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.param-field-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: linear-gradient(145deg, rgba(7, 10, 18, 0.82), rgba(6, 8, 14, 0.68));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.param-field-card.param-field-card-saved {
  border-color: rgba(29, 233, 182, 0.42);
  background: linear-gradient(145deg, rgba(6, 26, 24, 0.88), rgba(7, 14, 16, 0.72));
  box-shadow:
    inset 0 0 0 1px rgba(29, 233, 182, 0.16),
    0 0 0 1px rgba(29, 233, 182, 0.08),
    0 18px 32px rgba(5, 19, 18, 0.2);
}

.param-field-card.param-field-card-dirty {
  border-color: rgba(255, 179, 0, 0.58);
  background: linear-gradient(145deg, rgba(31, 20, 6, 0.88), rgba(18, 11, 6, 0.76));
  box-shadow:
    inset 0 0 0 1px rgba(255, 179, 0, 0.2),
    0 0 0 1px rgba(255, 179, 0, 0.12),
    0 18px 32px rgba(33, 20, 3, 0.22);
}

.param-field-card.param-field-card-saved .field-label,
.param-field-card.param-field-card-saved .slider-value {
  color: #dcfff5;
}

.param-field-card.param-field-card-dirty .field-label,
.param-field-card.param-field-card-dirty .slider-value {
  color: #fff2c3;
}

.param-field-card.param-field-card-saved .slider-value {
  border-color: rgba(29, 233, 182, 0.62);
  background: rgba(29, 233, 182, 0.18);
  box-shadow: 0 0 0 1px rgba(29, 233, 182, 0.12);
}

.param-field-card.param-field-card-dirty .slider-value {
  border-color: rgba(255, 179, 0, 0.62);
  background: rgba(255, 179, 0, 0.16);
  box-shadow: 0 0 0 1px rgba(255, 179, 0, 0.12);
}

.param-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-label {
  display: block;
  color: #eef2ff;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.param-control {
  width: 100%;
}

.slider-field {
  gap: 8px !important;
}

.slider-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.slider-row input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  height: 24px;
}

.slider-row input[type="range"]::-webkit-slider-runnable-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(29, 233, 182, 0.78), rgba(255, 123, 0, 0.75));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: #f7fffd;
  box-shadow: 0 0 0 6px rgba(29, 233, 182, 0.15), 0 0 18px rgba(29, 233, 182, 0.42);
}

.slider-row input[type="range"]::-moz-range-track {
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(29, 233, 182, 0.78), rgba(255, 123, 0, 0.75));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.slider-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: #f7fffd;
  box-shadow: 0 0 0 6px rgba(29, 233, 182, 0.15), 0 0 18px rgba(29, 233, 182, 0.42);
}

.param-field-card.param-field-card-saved .slider-row input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 0 0 7px rgba(29, 233, 182, 0.2), 0 0 22px rgba(29, 233, 182, 0.55);
}

.param-field-card.param-field-card-dirty .slider-row input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 0 0 7px rgba(255, 179, 0, 0.18), 0 0 22px rgba(255, 179, 0, 0.48);
}

.param-field-card.param-field-card-saved .slider-row input[type="range"]::-moz-range-thumb {
  box-shadow: 0 0 0 7px rgba(29, 233, 182, 0.2), 0 0 22px rgba(29, 233, 182, 0.55);
}

.param-field-card.param-field-card-dirty .slider-row input[type="range"]::-moz-range-thumb {
  box-shadow: 0 0 0 7px rgba(255, 179, 0, 0.18), 0 0 22px rgba(255, 179, 0, 0.48);
}

.slider-value {
  min-width: 70px;
  text-align: center;
  font-weight: 800;
  border: 1px solid rgba(29, 233, 182, 0.45);
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(29, 233, 182, 0.12);
  color: #d9fff4;
}

.param-card-head .slider-value {
  margin-left: auto;
}

.param-field-card .slider-row {
  grid-template-columns: minmax(0, 1fr);
}

.slider-meta {
  display: flex;
  justify-content: space-between;
  color: #93a3bd;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.field-help {
  color: #9ea7bb;
  line-height: 1.4;
  font-size: 0.83rem;
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid rgba(29, 233, 182, 0.58);
  border-radius: 8px;
  background: rgba(159, 163, 179, 0.1);
}

.param-field-card.param-field-card-saved .field-help {
  color: #d5f9ee;
  border-left-color: rgba(29, 233, 182, 0.82);
  background: linear-gradient(145deg, rgba(8, 35, 32, 0.78), rgba(18, 27, 31, 0.88));
}

.param-field-card.param-field-card-dirty .field-help {
  color: #ffe9ba;
  border-left-color: rgba(255, 179, 0, 0.88);
  background: linear-gradient(145deg, rgba(43, 28, 8, 0.78), rgba(31, 21, 10, 0.88));
}

.params-explain {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(140deg, rgba(7, 10, 18, 0.8), rgba(8, 12, 24, 0.62));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.params-explain h3 {
  margin: 0 0 8px;
  color: var(--lime);
  font-family: "Space Grotesk", sans-serif;
}

.params-explain p {
  margin: 0 0 6px;
  color: #bdc8db;
}

.params-explain p:last-child {
  margin-bottom: 0;
}

input,
select,
textarea,
button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(3, 6, 13, 0.94), rgba(8, 11, 20, 0.95));
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(29, 233, 182, 0.6);
  border-color: transparent;
}

.param-control.is-invalid {
  border-color: rgba(255, 77, 109, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 77, 109, 0.18);
}

.param-field-card.param-field-card-saved .param-control:not(.is-invalid) {
  border-color: rgba(29, 233, 182, 0.4);
  box-shadow: inset 0 0 0 1px rgba(29, 233, 182, 0.1);
}

.param-field-card.param-field-card-dirty .param-control:not(.is-invalid) {
  border-color: rgba(255, 179, 0, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255, 179, 0, 0.1);
}

textarea {
  min-height: 150px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

input[type="date"] {
  color-scheme: dark;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.28) saturate(1.2);
  cursor: pointer;
}

.date-alt-input.flatpickr-input[readonly] {
  cursor: pointer;
}

.flatpickr-calendar {
  width: 318px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 92% 8%, rgba(255, 123, 0, 0.22), transparent 34%),
    radial-gradient(circle at 8% 92%, rgba(29, 233, 182, 0.14), transparent 44%),
    linear-gradient(160deg, rgba(9, 13, 22, 0.98), rgba(6, 9, 16, 0.98));
  color: #e8efff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(29, 233, 182, 0.14);
  font-family: "Space Grotesk", sans-serif;
}

.flatpickr-calendar::before,
.flatpickr-calendar::after {
  display: none;
}

.flatpickr-months .flatpickr-month {
  color: #f4f8ff;
  fill: #f4f8ff;
}

.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
  color: #f4f8ff;
  font-weight: 700;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  background: rgba(255, 255, 255, 0.08);
}

.flatpickr-weekdays {
  margin-top: 4px;
}

.flatpickr-weekdays .flatpickr-weekday {
  color: #c8e3ff !important;
  opacity: 1 !important;
  font-weight: 700;
  font-size: 0.82rem;
  text-shadow: 0 0 10px rgba(8, 16, 34, 0.55);
}

.flatpickr-prev-month,
.flatpickr-next-month {
  color: #e9f6ff !important;
  fill: #e9f6ff !important;
  border-radius: 10px;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.flatpickr-prev-month span,
.flatpickr-next-month span {
  color: inherit !important;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 10px rgba(7, 17, 35, 0.65);
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  color: #77ffe2 !important;
  fill: #77ffe2 !important;
  background: rgba(29, 233, 182, 0.18);
}

.flatpickr-day {
  border-radius: 10px;
  color: #e6eefc;
  border: 1px solid transparent;
}

.flatpickr-day:hover {
  background: rgba(29, 233, 182, 0.16);
  border-color: rgba(29, 233, 182, 0.38);
}

.flatpickr-day.today {
  border-color: rgba(255, 179, 0, 0.75);
  color: #ffe6b5;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
  color: #061117;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(29, 233, 182, 0.98), rgba(120, 255, 214, 0.98));
  box-shadow: 0 8px 18px rgba(29, 233, 182, 0.34);
}

.flatpickr-day.inRange {
  background: rgba(29, 233, 182, 0.14);
  border-color: rgba(29, 233, 182, 0.2);
  box-shadow: none;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.notAllowed {
  color: rgba(142, 156, 182, 0.62);
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
  fill: #76ffe0;
}

.flatpickr-time .numInputWrapper span.arrowUp::after,
.flatpickr-time .numInputWrapper span.arrowDown::after {
  border-bottom-color: #d5e9ff;
  border-top-color: #d5e9ff;
}

button {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, var(--orange), #ffb300);
  color: #070708;
  font-weight: 700;
  transition: transform 0.2s ease, filter 0.2s ease;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-secondary {
  background: linear-gradient(130deg, rgba(29, 233, 182, 0.95), rgba(120, 255, 214, 0.95));
}

.btn-danger {
  background: linear-gradient(130deg, rgba(255, 77, 109, 0.92), rgba(255, 47, 146, 0.92));
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.btn-ghost:hover {
  transform: none;
  filter: none;
  border-color: rgba(255, 255, 255, 0.35);
}

.sidebar-logout {
  width: 100%;
  margin-top: 0;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-shell[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.76);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 123, 0, 0.18), transparent 34%),
    radial-gradient(circle at 10% 92%, rgba(29, 233, 182, 0.12), transparent 40%),
    linear-gradient(150deg, rgba(12, 16, 26, 0.98), rgba(5, 8, 13, 0.98));
  box-shadow: 0 24px 46px rgba(0, 0, 0, 0.55);
}

.event-edit-modal-card {
  width: min(640px, 100%);
  max-height: min(86vh, 700px);
}

.feedback-modal-card {
  width: min(680px, 100%);
  max-height: min(92vh, 800px);
}

.event-edit-modal-card .grid-form {
  margin-top: 12px;
  gap: 12px;
}

.event-edit-modal-card .actions-row {
  margin-top: 4px;
}

.feedback-form {
  margin-top: 12px;
  gap: 10px;
}

.feedback-message-field {
  position: relative;
  display: grid;
  gap: 8px !important;
}

.feedback-message-field textarea {
  height: 132px;
  min-height: 132px;
  max-height: 132px;
  padding-right: 78px;
  padding-bottom: 28px;
  resize: none;
  overflow-y: auto;
}

.feedback-form .actions-row {
  margin-top: 0;
}

.feedback-message-counter {
  position: absolute;
  right: 14px;
  bottom: 12px;
  pointer-events: none;
  color: #9ea7bb;
  font-size: 0.82rem;
  line-height: 1;
}

.feedback-captcha-block {
  display: grid;
  gap: 6px;
}

.feedback-captcha-block .captcha-box {
  background: linear-gradient(145deg, rgba(4, 7, 14, 0.84), rgba(7, 10, 18, 0.72));
  padding: 10px 12px;
}

.confirm-modal-card {
  max-width: 540px;
}

.confirm-modal-copy {
  display: grid;
  gap: 10px;
}

.confirm-modal-copy .modal-lead {
  margin: 0;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

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

.modal-head h2 {
  margin: 0;
}

.modal-close {
  width: 36px;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-lead {
  margin: 10px 0 14px;
  color: #d0d9eb;
  line-height: 1.42;
}

.modal-order {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #dbe6fa;
  line-height: 1.4;
}

.modal-order strong {
  color: #fff3ce;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.tip-card {
  display: grid;
  gap: 8px;
  border-radius: 14px;
  padding: 14px 14px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 123, 0, 0.08), transparent 30%),
    linear-gradient(160deg, rgba(10, 14, 23, 0.94), rgba(7, 10, 18, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 12px 22px rgba(0, 0, 0, 0.1);
}

.tip-card h3 {
  margin: 0;
  color: var(--lime);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.tip-card p {
  margin: 0;
  color: #d3deef;
  font-size: 0.96rem;
  line-height: 1.4;
}

.tip-card strong {
  color: #fff2cd;
}

.tips-grid .tip-card:last-child {
  grid-column: 1 / -1;
}

.modal-note {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #a9b6cd;
  font-size: 0.95rem;
  line-height: 1.45;
}

.table-wrap {
  overflow-x: auto;
}

.events-panel {
  position: relative;
  overflow: hidden;
}

.events-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 8%, rgba(35, 198, 255, 0.14), transparent 35%),
    radial-gradient(circle at 90% 18%, rgba(255, 77, 109, 0.12), transparent 28%);
}

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

.events-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 640px;
}

.events-table col.col-date {
  width: 16%;
}

.events-table col.col-phase {
  width: 28%;
}

.events-table col.col-notes {
  width: 24%;
}

.events-table col.col-actions {
  width: 32%;
}

.events-table th,
.events-table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  vertical-align: middle;
}

.events-table td {
  overflow-wrap: anywhere;
}

.events-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.events-table th {
  color: var(--lime);
  font-size: 0.9rem;
}

.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.result-card {
  border-radius: 12px;
  padding: 14px;
  background: rgba(9, 10, 15, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.result-card.empty {
  color: var(--muted);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.result-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 8px;
}

.result-item strong {
  display: block;
  color: var(--lime);
  margin-bottom: 4px;
}

.params-summary {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(6, 8, 15, 0.7);
}

.params-summary h3 {
  margin: 0 0 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.02rem;
  color: #ecf4ff;
}

.params-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.param-chip {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
  display: grid;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
}

.param-chip span {
  color: #9ea7bb;
  font-size: 0.85rem;
}

.param-chip strong {
  color: #f6f8ff;
}

.param-chip.missing {
  opacity: 0.58;
  border-color: rgba(255, 255, 255, 0.09);
}

.param-chip.filled {
  border-color: rgba(29, 233, 182, 0.34);
  box-shadow: inset 0 0 0 1px rgba(29, 233, 182, 0.14);
}

.explanations {
  margin-top: 12px;
  padding-left: 16px;
}

.explanations li {
  margin-bottom: 4px;
  color: var(--muted);
}

.hint {
  min-height: 20px;
  margin: 4px 2px 0;
  color: var(--muted);
}

.hint.error {
  color: #ff8aa5;
}

.hint.success {
  color: #dffef5;
}

.feedback-status-slot {
  min-height: 0;
}

#feedback-status {
  margin: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#feedback-status:empty {
  display: none;
}

#feedback-status.success,
#feedback-status.error {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 70;
  width: min(680px, calc(100vw - 32px));
  transform: translateX(-50%);
  margin: 0;
  padding: 13px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(7, 11, 19, 0.88), rgba(6, 9, 15, 0.76));
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.34);
}

#feedback-status.success {
  border-color: rgba(29, 233, 182, 0.46);
  background:
    radial-gradient(circle at 92% 22%, rgba(29, 233, 182, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(6, 16, 17, 0.92), rgba(7, 13, 19, 0.9));
  font-weight: 700;
  line-height: 1.45;
}

.empty-state {
  color: var(--muted);
  margin: 8px 0 0;
}

.loading-state,
.loading-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.loading-state::before,
.loading-inline::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(29, 233, 182, 0.95);
  animation: spin 0.9s linear infinite;
}

.loading-state {
  margin: 8px 0 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#calendar {
  min-height: 640px;
}

.calendar-panel {
  position: relative;
  overflow: hidden;
}

.calendar-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 77, 109, 0.18), transparent 32%),
    radial-gradient(circle at 92% 20%, rgba(29, 233, 182, 0.2), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(255, 123, 0, 0.16), transparent 46%);
  filter: saturate(1.18);
}

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

.big-calendar-panel #calendar {
  min-height: 780px;
}

.calendar-legend {
  margin-top: 12px;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(7, 10, 18, 0.82), rgba(9, 13, 24, 0.7));
}

.calendar-legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #dce3f5;
  font-size: 0.82rem;
  font-weight: 700;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.legend-swatch-ovulation {
  background: linear-gradient(130deg, #ff7b00, #ffbf5a);
}

.legend-swatch-fertile {
  background: linear-gradient(130deg, #1de9b6, #23c6ff);
}

.legend-swatch-follicular {
  background: linear-gradient(130deg, #6ca4ff, #2d6fe8);
}

.legend-swatch-luteal {
  background: linear-gradient(130deg, #ff9750, #b35e2d);
}

.legend-swatch-pms {
  background: linear-gradient(130deg, #ff2f92, #ff6fae);
}

.legend-swatch-period {
  background: linear-gradient(130deg, #ff4d6d, #ff7b92);
}

.legend-swatch-fact {
  background: linear-gradient(130deg, #f6f8ff, #9fa3b3);
}

.calendar-legend-active {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.legend-active-item {
  display: block;
  font-size: 0.83rem;
  color: #d2def5;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
}

.legend-active-text {
  line-height: 1.35;
}

.fc {
  --fc-neutral-bg-color: rgba(255, 255, 255, 0.04);
  --fc-page-bg-color: transparent;
  --fc-border-color: rgba(255, 255, 255, 0.12);
  --fc-list-event-hover-bg-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.fc .fc-daygrid-day-frame {
  min-height: 116px;
  border-radius: 10px;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.fc .fc-daygrid-day:hover .fc-daygrid-day-frame {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.fc .fc-daygrid-day.fc-day-today {
  background: rgba(29, 233, 182, 0.2);
}

.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
  color: #0f1e17;
  font-weight: 800;
  background: linear-gradient(120deg, rgba(29, 233, 182, 0.95), rgba(120, 255, 214, 0.96));
  border-radius: 999px;
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
  padding: 0 8px;
  box-shadow: 0 8px 20px rgba(29, 233, 182, 0.34);
}

.fc .fc-toolbar-title {
  color: var(--lime);
  font-family: "Space Grotesk", sans-serif;
  text-transform: lowercase;
}

.fc .fc-button {
  background: rgba(255, 123, 0, 0.24);
  border: 1px solid rgba(255, 123, 0, 0.6);
}

.fc .fc-button:hover,
.fc .fc-button:focus {
  background: rgba(255, 123, 0, 0.38);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: linear-gradient(135deg, rgba(255, 123, 0, 0.9), rgba(255, 179, 0, 0.9));
  border-color: rgba(255, 179, 0, 0.95);
}

.fc .fc-col-header-cell-cushion {
  color: #edf4ff;
  font-weight: 700;
}

.fc .fc-daygrid-day-number {
  color: #f1f3fb;
  font-weight: 700;
}

.calendar-hover-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: min(340px, calc(100vw - 20px));
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(147, 241, 218, 0.52);
  background: linear-gradient(132deg, rgba(7, 18, 42, 0.94), rgba(30, 21, 54, 0.94));
  color: #e9f8ff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow: 0 10px 30px rgba(1, 8, 22, 0.62), 0 0 0 1px rgba(121, 255, 222, 0.22);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.calendar-hover-tooltip[hidden] {
  display: none !important;
}

.fc .fc-daygrid-event .fc-event-main {
  white-space: normal;
}

.fc .fc-bg-event {
  opacity: 1;
}

.fc .fc-bg-event.cycle-range {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 0 28px var(--range-glow);
  overflow: hidden;
  isolation: isolate;
  opacity: 0.78;
}

.fc .fc-bg-event.cycle-range::before {
  content: "";
  position: absolute;
  inset: -48% -22%;
  background: linear-gradient(115deg, transparent 24%, rgba(255, 255, 255, 0.3) 50%, transparent 76%);
  transform: translateX(-56%);
  animation: range-sheen 4.8s linear infinite;
  opacity: 0.14;
}

.fc .fc-bg-event.cycle-range .fc-event-title {
  display: none;
}

.fc .fc-bg-event.cycle-range-period {
  --range-glow: rgba(255, 77, 109, 0.25);
  background:
    linear-gradient(125deg, rgba(255, 77, 109, 0.14), rgba(255, 102, 129, 0.1)),
    repeating-linear-gradient(-45deg, rgba(255, 77, 109, 0.08) 0 8px, rgba(255, 77, 109, 0.03) 8px 16px);
  filter: saturate(0.86) brightness(0.94);
}

.fc .fc-bg-event.cycle-range-pms {
  --range-glow: rgba(255, 47, 146, 0.28);
  background:
    linear-gradient(125deg, rgba(255, 47, 146, 0.18), rgba(255, 111, 174, 0.13)),
    repeating-linear-gradient(-45deg, rgba(255, 47, 146, 0.1) 0 9px, rgba(255, 47, 146, 0.03) 9px 18px);
  filter: saturate(0.84) brightness(0.94);
}

.fc .fc-bg-event.cycle-range-fertile {
  --range-glow: rgba(29, 233, 182, 0.28);
  background:
    linear-gradient(125deg, rgba(29, 233, 182, 0.17), rgba(35, 198, 255, 0.13)),
    repeating-linear-gradient(-45deg, rgba(29, 233, 182, 0.09) 0 8px, rgba(29, 233, 182, 0.03) 8px 16px);
  filter: saturate(0.84) brightness(0.94);
}

.fc .fc-bg-event.cycle-range-ovulation {
  --range-glow: rgba(255, 123, 0, 0.9);
  background:
    linear-gradient(125deg, rgba(255, 123, 0, 0.64), rgba(255, 179, 0, 0.32)),
    repeating-linear-gradient(-45deg, rgba(255, 123, 0, 0.24) 0 8px, rgba(255, 123, 0, 0.08) 8px 16px);
  border-color: rgba(255, 197, 117, 0.84);
  opacity: 1;
  filter: saturate(1.1) brightness(1.04);
}

.fc .fc-bg-event.cycle-range-follicular {
  --range-glow: rgba(108, 164, 255, 0.2);
  background:
    linear-gradient(125deg, rgba(58, 125, 255, 0.12), rgba(27, 80, 178, 0.09)),
    repeating-linear-gradient(-45deg, rgba(111, 167, 255, 0.06) 0 8px, rgba(111, 167, 255, 0.03) 8px 16px);
  filter: saturate(0.84) brightness(0.94);
}

.fc .fc-bg-event.cycle-range-luteal {
  --range-glow: rgba(255, 166, 71, 0.2);
  background:
    linear-gradient(125deg, rgba(255, 151, 57, 0.12), rgba(166, 74, 16, 0.09)),
    repeating-linear-gradient(-45deg, rgba(255, 151, 57, 0.06) 0 9px, rgba(255, 151, 57, 0.03) 9px 18px);
  filter: saturate(0.82) brightness(0.93);
}

.fc .fc-daygrid-event.fact-event {
  border: none;
  border-radius: 9px;
  padding: 4px 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  font-weight: 800;
}

.fc .fc-daygrid-event.fact-event .fc-event-title {
  overflow: hidden;
  text-overflow: ellipsis;
}

.fact-label-content {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.fc .fc-daygrid-event.phase-label {
  border: none;
  border-radius: 999px;
  min-height: 20px;
  padding: 2px 8px;
  width: fit-content !important;
  max-width: calc(100% - 6px);
  right: auto !important;
  margin-right: auto;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.86;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(2px);
}

.fc .fc-daygrid-event.phase-label .fc-event-main {
  color: #f8faff;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.phase-label-content {
  width: auto;
  max-width: 100%;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(246, 250, 255, 0.82);
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(5, 8, 13, 0.62);
}

.fc .fc-daygrid-event.phase-label-ovulation {
  background: linear-gradient(130deg, rgba(255, 123, 0, 0.62), rgba(255, 188, 96, 0.54));
  opacity: 0.97;
  filter: saturate(1.08) brightness(1.04);
}

.fc .fc-daygrid-event.phase-label-fertile {
  background: linear-gradient(130deg, rgba(29, 233, 182, 0.56), rgba(35, 198, 255, 0.46));
  opacity: 0.8;
  filter: saturate(0.86) brightness(0.94);
}

.fc .fc-daygrid-event.phase-label-pms {
  background: linear-gradient(130deg, rgba(255, 47, 146, 0.58), rgba(255, 111, 174, 0.48));
  opacity: 0.8;
  filter: saturate(0.86) brightness(0.94);
}

.fc .fc-daygrid-event.phase-label-period {
  background: linear-gradient(130deg, rgba(255, 77, 109, 0.56), rgba(255, 123, 146, 0.46));
  opacity: 0.8;
  filter: saturate(0.86) brightness(0.94);
}

.fc .fc-daygrid-event.phase-label-luteal {
  background: linear-gradient(130deg, rgba(255, 151, 57, 0.54), rgba(189, 96, 35, 0.46));
  opacity: 0.8;
  filter: saturate(0.82) brightness(0.92);
}

.fc .fc-daygrid-event.phase-label-follicular {
  background: linear-gradient(130deg, rgba(108, 164, 255, 0.5), rgba(45, 111, 232, 0.42));
  opacity: 0.8;
  filter: saturate(0.84) brightness(0.94);
}

.fc .fc-daygrid-event.phase-label-fertile .phase-label-content {
  font-size: 0.6rem;
  letter-spacing: 0.005em;
}

.fc .fc-daygrid-event.peak-event {
  border: none;
  border-radius: 999px;
  padding: 4px 10px;
  box-shadow: 0 0 0 1px rgba(255, 195, 130, 0.72), 0 12px 22px rgba(255, 123, 0, 0.48), 0 0 20px rgba(255, 170, 0, 0.42);
  background: linear-gradient(128deg, rgba(255, 123, 0, 0.93), rgba(255, 175, 0, 0.9) 48%, rgba(255, 209, 59, 0.9));
  font-weight: 800;
  font-size: 0.82rem;
  overflow: hidden;
}

.fc .fc-daygrid-event.peak-event .fc-event-main {
  color: #150a00;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fc .fc-daygrid-event.peak-event-main {
  border-radius: 18px;
  min-height: 72px;
  min-width: 120px;
  width: 100%;
  box-shadow: 0 0 0 2px rgba(255, 233, 175, 0.92), 0 20px 40px rgba(255, 123, 0, 0.84), 0 0 38px rgba(255, 181, 0, 0.76);
  animation: peak-pulse 1.7s ease-in-out infinite;
}

.fc .fc-daygrid-event.peak-event-future {
  opacity: 0.9;
  box-shadow: 0 0 0 1px rgba(255, 195, 130, 0.62), 0 8px 18px rgba(255, 123, 0, 0.38);
}

.fc .fc-daygrid-event.peak-event-past {
  opacity: 0.72;
  filter: saturate(0.75);
  box-shadow: 0 0 0 1px rgba(255, 195, 130, 0.38), 0 6px 12px rgba(255, 123, 0, 0.22);
}

.peak-main-content {
  width: 100%;
  min-height: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.03;
  text-align: center;
}

.peak-main-crown {
  font-size: 1rem;
  line-height: 1;
}

.peak-main-word {
  display: block;
  font-weight: 900;
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  letter-spacing: 0.01em;
  color: #140900;
  text-transform: lowercase;
}

.peak-future-content,
.peak-past-content {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
}

.peak-future-content span:first-child,
.peak-past-content span:first-child {
  font-size: 0.84rem;
}

.peak-future-content span:last-child,
.peak-past-content span:last-child {
  font-size: 0.74rem;
  font-weight: 800;
}

.peak-past-content {
  opacity: 0.84;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  padding: 10px 0 24px;
}

.content-footer {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.content-footer-note {
  margin: 0;
}

.content-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.bottom-action-btn {
  min-height: 48px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 0.96rem;
  line-height: 1.2;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.26);
}

.bottom-action-btn.btn-ghost {
  border-style: dashed;
  border-color: rgba(29, 233, 182, 0.45);
  color: #d8fff4;
  background: rgba(29, 233, 182, 0.08);
}

.bottom-action-btn.btn-ghost:hover {
  border-color: rgba(29, 233, 182, 0.65);
  background: rgba(29, 233, 182, 0.14);
}

.landing-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 22px;
  display: grid;
  gap: 18px;
  position: relative;
  z-index: 2;
}

.landing-hero {
  display: grid;
  gap: 28px;
  overflow: hidden;
  position: relative;
  padding: 24px 26px 28px;
  background:
    radial-gradient(circle at 10% 20%, rgba(29, 233, 182, 0.2), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(255, 123, 0, 0.22), transparent 32%),
    linear-gradient(150deg, rgba(11, 13, 20, 0.97), rgba(6, 9, 16, 0.98));
}

.landing-hero h1 {
  margin: 0;
  max-width: 12.4ch;
  font-size: clamp(2.7rem, 5.1vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.landing-badge {
  margin: 0;
  width: fit-content;
  justify-self: center;
  padding: 16px 34px;
  border-radius: 999px;
  border: 1px solid rgba(29, 233, 182, 0.5);
  color: #d1fff2;
  background: rgba(29, 233, 182, 0.12);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(1.78rem, 3.1vw, 2.95rem);
  line-height: 1;
  box-shadow: 0 18px 40px rgba(29, 233, 182, 0.14);
}

.landing-hero .brand-subtitle,
.auth-intro .brand-subtitle {
  justify-self: center;
}

.landing-brand-stack {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.landing-brand-stack .brand-subtitle {
  font-size: clamp(1.24rem, 2vw, 1.62rem);
  letter-spacing: -0.02em;
}

.landing-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(320px, 0.9fr);
  gap: 26px;
  align-items: start;
}

.landing-hero-copy {
  display: grid;
  gap: 16px;
  align-content: start;
}

.landing-kicker {
  margin: 0;
  color: #8ef4de;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.landing-usecase,
.landing-summary,
.landing-account-note {
  margin: 0;
  color: #c6d3eb;
  line-height: 1.58;
}

.landing-usecase {
  max-width: 54ch;
  font-size: clamp(1.08rem, 1.7vw, 1.22rem);
  color: #eef5ff;
}

.landing-summary {
  max-width: 56ch;
  font-size: 1.02rem;
}

.landing-summary-secondary {
  max-width: 58ch;
  color: #d7e6ff;
}

.landing-account-note {
  max-width: 44ch;
  color: #a9bcc7;
  font-size: 0.94rem;
}

.landing-showcase-panel {
  display: grid;
  align-content: start;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 123, 0, 0.16), transparent 34%),
    linear-gradient(155deg, rgba(12, 16, 26, 0.96), rgba(8, 11, 18, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 24px 48px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.landing-showcase-kicker {
  margin: 0;
  padding: 18px 20px 14px;
  color: #dff8f2;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-showcase-list {
  display: grid;
}

.landing-showcase-item {
  display: grid;
  gap: 7px;
  padding: 18px 20px;
}

.landing-showcase-item + .landing-showcase-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-showcase-item p {
  margin: 0;
  color: #d3def2;
  line-height: 1.5;
  font-size: 1rem;
}

.landing-showcase-item-accent {
  background:
    radial-gradient(circle at 90% 14%, rgba(255, 123, 0, 0.14), transparent 38%),
    linear-gradient(145deg, rgba(28, 15, 10, 0.88), rgba(17, 13, 23, 0.82));
}

.landing-showcase-label {
  color: #8ef4de;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.landing-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.landing-user-meta {
  margin: 0;
  color: #d7ebff;
  font-size: 0.95rem;
}

.landing-user-meta strong {
  color: #f4fff9;
}

.landing-btn-primary,
.landing-btn-ghost,
.landing-btn-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 12px;
  font-family: "Space Grotesk", sans-serif;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
}

.landing-btn-primary {
  color: #08090c;
  background: linear-gradient(130deg, rgba(29, 233, 182, 0.95), rgba(120, 255, 214, 0.95));
}

.landing-btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.06);
}

.landing-btn-demo {
  color: #08090c;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--orange), #ffb300);
}

.landing-btn-logout {
  cursor: pointer;
  font-size: 1rem;
}

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

.landing-card {
  min-height: 100%;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px;
}

.landing-card h2 {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.58rem);
  line-height: 1.16;
}

.landing-card p {
  margin: 0;
  color: #cad6eb;
  line-height: 1.52;
}

.landing-footer {
  text-align: center;
  color: #96a8c6;
  font-size: 0.9rem;
}

.demo-layout .sidebar {
  display: grid;
  gap: 12px;
}

.demo-hero {
  gap: 8px;
}

.demo-layout .content-column > .demo-hero {
  order: 1;
}

.demo-layout .content-column > #demo-tools-panel {
  order: 2;
}

.demo-layout .content-column > #demo-calendar-panel {
  order: 3;
}

.demo-layout .content-column > #demo-result-panel {
  order: 4;
}

.demo-layout .content-column > #demo-footer {
  order: 5;
}

.demo-layout.demo-has-first-fact .content-column > #demo-calendar-panel {
  order: 2;
}

.demo-layout.demo-has-first-fact .content-column > #demo-result-panel {
  order: 3;
}

.demo-layout.demo-has-first-fact .content-column > #demo-tools-panel {
  order: 4;
}

.demo-ovulation-focus {
  margin-bottom: 12px;
}

.demo-ovulation-focus:focus-visible {
  outline: 2px solid rgba(29, 233, 182, 0.7);
  outline-offset: 3px;
}

.demo-tools-panel {
  display: grid;
  gap: 12px;
}

.demo-tools-intro {
  margin: 0;
  color: #c6d3eb;
  line-height: 1.45;
}

.demo-tools-grid {
  display: grid;
  gap: 12px;
}

.demo-disclaimer-block {
  margin-bottom: 4px;
}

.demo-side-block {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(7, 11, 19, 0.9), rgba(6, 9, 15, 0.75));
  padding: 12px;
}

.demo-side-block h3 {
  margin: 0;
  color: var(--lime);
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.demo-side-block .compact-form {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.demo-event-actions {
  gap: 8px;
}

.demo-event-actions > button {
  flex: 1;
}

.demo-upgrade-card {
  width: min(700px, 100%);
}

.demo-upgrade-card .modal-lead {
  text-align: center;
}

.demo-upgrade-actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.demo-upgrade-register-btn {
  width: min(420px, 100%);
  min-height: 62px;
  font-size: clamp(1.28rem, 2.4vw, 1.7rem);
  padding: 14px 22px;
  text-align: center;
}

.auth-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px;
  display: grid;
  gap: 16px;
}

.auth-intro {
  display: grid;
  gap: 14px;
}

.auth-intro h1 {
  margin: 0;
}

.auth-intro p {
  margin: 0;
  color: #c3d1e8;
}

.auth-proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.auth-proof-card {
  display: grid;
  position: relative;
  overflow: hidden;
  align-content: start;
  gap: 6px;
  height: 100%;
  padding: 13px 15px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.025), transparent 48%),
    linear-gradient(180deg, rgba(15, 19, 29, 0.95), rgba(10, 13, 21, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 24px rgba(3, 6, 10, 0.14);
}

.auth-proof-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.auth-proof-card:nth-child(1) {
  border-color: rgba(255, 166, 94, 0.11);
  background:
    radial-gradient(circle at top right, rgba(255, 149, 76, 0.07), transparent 48%),
    linear-gradient(180deg, rgba(21, 18, 22, 0.95), rgba(12, 13, 20, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 24px rgba(19, 10, 5, 0.14);
}

.auth-proof-card:nth-child(1)::before {
  background: linear-gradient(90deg, rgba(255, 166, 94, 0.34), rgba(255, 166, 94, 0.04));
}

.auth-proof-card:nth-child(2) {
  border-color: rgba(118, 162, 255, 0.11);
  background:
    radial-gradient(circle at top right, rgba(108, 156, 255, 0.07), transparent 48%),
    linear-gradient(180deg, rgba(16, 20, 31, 0.95), rgba(10, 13, 21, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 24px rgba(7, 11, 24, 0.14);
}

.auth-proof-card:nth-child(2)::before {
  background: linear-gradient(90deg, rgba(118, 162, 255, 0.34), rgba(118, 162, 255, 0.04));
}

.auth-proof-card strong {
  color: #f3f8ff;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.06rem, 1.25vw, 1.22rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.auth-proof-card p {
  margin: 0;
  color: #afc0d6;
  font-size: 0.88rem;
  line-height: 1.34;
}

.auth-proof-card-accent {
  border-color: rgba(29, 233, 182, 0.12);
  background:
    radial-gradient(circle at top right, rgba(29, 233, 182, 0.07), transparent 48%),
    linear-gradient(180deg, rgba(16, 23, 29, 0.95), rgba(10, 15, 21, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 12px 24px rgba(6, 14, 16, 0.14);
}

.auth-proof-card-accent::before {
  background: linear-gradient(90deg, rgba(29, 233, 182, 0.34), rgba(29, 233, 182, 0.04));
}

.auth-brand-stack {
  justify-items: center;
}

.auth-brand-stack .landing-badge {
  padding: 14px 28px;
  font-size: clamp(1.58rem, 2.7vw, 2.4rem);
}

.auth-back-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(29, 233, 182, 0.34);
  background: rgba(29, 233, 182, 0.08);
  color: #d5fff5;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 0.96rem;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(29, 233, 182, 0.08);
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.auth-back-link:hover {
  color: #f6fffc;
  border-color: rgba(29, 233, 182, 0.55);
  background: rgba(29, 233, 182, 0.14);
  box-shadow: 0 16px 32px rgba(29, 233, 182, 0.12);
  transform: translateY(-1px);
}

.tips-modal-card {
  width: min(980px, 100%);
  max-height: min(92vh, 880px);
}

.tips-modal-card .modal-head {
  align-items: center;
}

.tips-modal-card .modal-head h2 {
  font-size: clamp(1.72rem, 2.8vw, 2.15rem);
}

.tips-modal-card .modal-lead {
  margin: 10px 0 14px;
  max-width: 64ch;
  color: #dde6f5;
  font-size: 0.98rem;
  line-height: 1.46;
}

.tips-modal-card .modal-order {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border-color: rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 123, 0, 0.08), transparent 32%),
    linear-gradient(145deg, rgba(15, 18, 28, 0.9), rgba(10, 12, 20, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  font-size: 0.95rem;
  line-height: 1.42;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(360px, 1.08fr);
  gap: 16px;
  align-items: stretch;
}

.auth-card h2 {
  margin-top: 0;
}

.auth-card,
.auth-shared-captcha {
  display: grid;
  align-content: start;
  height: 100%;
}

.auth-form {
  gap: 12px;
}

.auth-shared-captcha {
  gap: 14px;
  min-width: 0;
}

.auth-captcha-frame {
  display: grid;
  gap: 12px;
  grid-template-rows: auto 1fr auto;
  height: 100%;
  align-content: start;
}

.auth-captcha-copy {
  display: grid;
  gap: 8px;
}

.auth-captcha-copy strong {
  font-size: clamp(1.2rem, 1.4vw, 1.42rem);
  line-height: 1.2;
}

.auth-captcha-content {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  align-self: start;
}

#captcha-math-fields,
#feedback-captcha-math-fields {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(220px, 280px);
  gap: 14px;
  align-items: end;
}

.smartcaptcha-slot {
  grid-column: 1 / -1;
  min-height: 76px;
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}

.smartcaptcha-slot[data-smartcaptcha-state="loading"]::before {
  content: "Подключаем SmartCaptcha...";
  color: var(--muted);
  font-size: 0.95rem;
}

.smartcaptcha-slot[data-smartcaptcha-state="ready"]::before,
.smartcaptcha-slot[data-smartcaptcha-state="error"]::before,
.smartcaptcha-slot[data-smartcaptcha-state="hidden"]::before {
  content: none;
}

.smartcaptcha-note {
  grid-column: 1 / -1;
  margin: 0;
  line-height: 1.35;
  font-size: 0.94rem;
}

.smartcaptcha-note a {
  color: #79ffe2;
  text-decoration: underline;
  text-decoration-color: rgba(121, 255, 226, 0.55);
}

.captcha-answer-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0;
}

.captcha-answer-label input {
  width: 100%;
}

.auth-captcha-content .captcha-question {
  align-self: center;
}

.auth-captcha-status {
  min-height: 1.35em;
  margin-top: auto;
}

.auth-shared-captcha .smartcaptcha-slot {
  justify-content: flex-start;
  align-items: flex-start;
  border-radius: 14px;
  min-height: 132px;
  overflow: visible;
  padding: 12px 12px 8px;
  background: linear-gradient(145deg, rgba(4, 7, 14, 0.9), rgba(8, 11, 20, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-shared-captcha .smartcaptcha-note {
  color: #9fb1ca;
}

.auth-footer {
  margin-top: 4px;
}

.captcha-box {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 12px;
  background: rgba(4, 8, 16, 0.78);
  display: grid;
  gap: 8px;
}

.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.captcha-question {
  margin: 0;
  color: #d4def1;
  font-family: "Space Grotesk", sans-serif;
}

#emoji-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 20;
}

.emoji {
  position: absolute;
  top: -70px;
  font-size: clamp(1rem, 2vw, 1.8rem);
  animation: drop 3.9s cubic-bezier(0.15, 0.62, 0.24, 1) forwards;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.45);
  will-change: transform, opacity;
}

@keyframes drop {
  0% {
    transform: translateY(0) rotate(0deg) scale(0.75);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  70% {
    opacity: 0.95;
  }
  100% {
    transform: translateY(135vh) rotate(620deg) scale(1.1);
    opacity: 0;
  }
}

@keyframes ambient-float {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.9);
  }
  35% {
    transform: translate3d(var(--float-x, 40px), var(--float-up, -22px), 0) rotate(9deg) scale(1);
  }
  70% {
    transform: translate3d(var(--float-back-x, -16px), var(--float-down, 16px), 0) rotate(-7deg) scale(0.96);
  }
  100% {
    transform: translate3d(0, 0, 0) rotate(0deg) scale(0.9);
  }
}

@keyframes range-sheen {
  0% {
    transform: translateX(-58%);
  }
  100% {
    transform: translateX(58%);
  }
}

@keyframes peak-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 1px rgba(255, 195, 130, 0.88), 0 16px 34px rgba(255, 123, 0, 0.7), 0 0 28px rgba(255, 170, 0, 0.58);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 1px rgba(255, 220, 160, 0.95), 0 20px 42px rgba(255, 123, 0, 0.85), 0 0 42px rgba(255, 183, 0, 0.72);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 1px rgba(255, 195, 130, 0.88), 0 16px 34px rgba(255, 123, 0, 0.7), 0 0 28px rgba(255, 170, 0, 0.58);
  }
}

@media (max-width: 980px) {
  .layout-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    max-height: none;
  }

  #calendar,
  .big-calendar-panel #calendar {
    min-height: 520px;
  }

  .params-cards-grid {
    grid-template-columns: 1fr;
  }

  .calendar-legend-active {
    grid-template-columns: 1fr;
  }

  .landing-grid,
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero-layout {
    grid-template-columns: 1fr;
  }

  .landing-hero h1 {
    max-width: 11ch;
  }

  .auth-captcha-content {
    gap: 10px;
  }

  .auth-shared-captcha {
    gap: 12px;
  }

  .auth-proof-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #captcha-math-fields,
  #feedback-captcha-math-fields {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 12px;
  }

  .landing-shell,
  .auth-shell {
    padding: 14px;
    gap: 12px;
  }

  .landing-hero {
    gap: 18px;
    padding: 20px 18px 22px;
  }

  .landing-brand-stack {
    gap: 8px;
  }

  .landing-badge {
    padding: 13px 24px;
    font-size: clamp(1.42rem, 6vw, 2.12rem);
  }

  .landing-brand-stack .brand-subtitle {
    font-size: 1.05rem;
  }

  .landing-hero-layout,
  .landing-hero-copy,
  .landing-showcase-list {
    gap: 12px;
  }

  .auth-proof-strip {
    grid-template-columns: 1fr;
  }

  .tips-modal-card .modal-head h2 {
    font-size: 1.52rem;
  }

  .tips-modal-card .modal-lead {
    margin: 10px 0 14px;
    font-size: 0.95rem;
  }

  .tips-modal-card .modal-order {
    padding: 11px 12px;
  }

  .landing-hero h1 {
    max-width: 11ch;
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .landing-showcase-kicker,
  .landing-showcase-item {
    padding-left: 16px;
    padding-right: 16px;
  }

  .layout-shell {
    position: relative;
    gap: 12px;
  }

  .content-column {
    gap: 12px;
  }

  .panel {
    padding: 12px;
    border-radius: 14px;
  }

  .hero {
    padding: 16px;
    border-radius: 14px;
  }

  .hero h1 {
    font-size: clamp(1.45rem, 7vw, 1.9rem);
  }

  .hero p {
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.4;
  }

  .grid-form {
    gap: 8px;
  }

  .mobile-sidebar-toggle {
    display: inline-flex;
    position: sticky;
    top: 8px;
    z-index: 44;
    margin-bottom: 4px;
  }

  .sidebar-mobile-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 42;
    background: rgba(3, 6, 12, 0.64);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }

  .layout-shell > .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 340px);
    max-width: 340px;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0 16px 16px 0;
    transform: translateX(calc(-100% - 14px));
    transition: transform 0.2s ease, visibility 0.2s ease;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    z-index: 43;
  }

  .sidebar-nav-section,
  .sidebar-profiles-section {
    padding: 12px;
    gap: 10px;
  }

  .sidebar-nav-btn {
    min-height: 44px;
    height: 44px;
    padding: 10px 12px;
    font-size: 0.94rem;
  }

  .profile-card {
    padding: 9px;
    gap: 7px;
  }

  body.mobile-sidebar-open .layout-shell > .sidebar {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  body.mobile-sidebar-open .sidebar-mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.mobile-sidebar-open .mobile-sidebar-toggle {
    opacity: 0;
    pointer-events: none;
  }

  .landing-actions {
    width: 100%;
    flex-direction: column;
  }

  .landing-btn-primary,
  .landing-btn-ghost,
  .landing-btn-demo {
    width: 100%;
  }

  .auth-grid {
    gap: 12px;
  }

  .auth-shared-captcha {
    gap: 10px;
  }

  .auth-captcha-frame {
    gap: 12px;
  }

  .auth-captcha-copy strong {
    font-size: 1.08rem;
  }

  .auth-shared-captcha .smartcaptcha-slot {
    min-height: 124px;
    padding: 8px 10px 4px;
  }

  .modal-shell {
    padding: 10px;
  }

  .modal-card {
    padding: 14px;
    border-radius: 14px;
  }

  .feedback-message-field textarea {
    height: 124px;
    min-height: 124px;
    max-height: 124px;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }

  .row-form {
    flex-direction: column;
  }

  .events-table {
    min-width: 540px;
  }

  .content-footer-actions {
    width: 100%;
    flex-direction: column;
  }

  .bottom-action-btn {
    width: 100%;
  }

  .param-field-card {
    padding: 12px;
    gap: 9px;
  }

  .param-card-head {
    flex-wrap: wrap;
  }

  .slider-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .param-card-head .slider-value {
    margin-left: 0;
  }

  #calendar,
  #demo-calendar,
  .big-calendar-panel #calendar {
    min-height: 420px;
  }

  .fc .fc-toolbar {
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
  }

  .fc .fc-toolbar-title {
    font-size: 1rem;
  }

  .fc .fc-button {
    padding: 0.2rem 0.45rem;
    font-size: 0.73rem;
  }

  .fc .fc-daygrid-day-frame {
    min-height: 86px;
  }

  .calendar-legend {
    margin-top: 10px;
    padding: 8px;
    gap: 6px;
  }

  .legend-active-item {
    padding: 7px 8px;
    font-size: 0.78rem;
  }

  .fact-label-content {
    font-size: 0.6rem;
  }

  .fc .fc-daygrid-event.phase-label {
    min-height: 17px;
    padding: 1px 6px;
  }

  .phase-label-content {
    font-size: 0.56rem;
  }

  .fc .fc-daygrid-event.peak-event-main {
    min-height: 56px;
    min-width: 0;
  }

  .peak-main-content {
    min-height: 48px;
  }

  .peak-main-word {
    font-size: 0.72rem;
  }
}
