﻿:root {
  color-scheme: dark;
  --bg-0: #0b0f14;
  --bg-1: #0f1822;
  --bg-2: #141f2b;
  --ink-0: #eaf2f6;
  --ink-1: #b9c7d6;
  --ink-2: #7b8a9b;
  --accent-0: #7df9ff;
  --accent-1: #67d1ff;
  --accent-2: #1d86ff;
  --danger: #ff6b6b;
  --ok: #42d98f;
  --card: rgba(20, 31, 43, 0.85);
  --glass: rgba(19, 26, 35, 0.65);
  --border: rgba(125, 249, 255, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-title: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Urbanist", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(circle at top, #122133 0%, #0b0f14 45%, #070a0d 100%);
  color: var(--ink-0);
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 18px 90px;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(125, 249, 255, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(67, 130, 255, 0.08) 0%, transparent 50%);
}

.app__top {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.app__top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.top-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(125, 249, 255, 0.25);
  background: rgba(12, 20, 30, 0.7);
  color: var(--ink-0);
  padding: 8px 14px;
  border-radius: 999px;
  font-family: var(--font-title);
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.top-btn__icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.top-btn--icon {
  padding: 8px 10px;
}

.top-btn:active {
  transform: scale(0.98);
}

.top-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-title);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-1);
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-0);
  box-shadow: 0 0 14px rgba(125, 249, 255, 0.7);
}

.progress {
  width: 100%;
  height: 6px;
  background: rgba(125, 249, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress__bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-0), var(--accent-2));
  transition: width 0.5s ease;
}

.app__main {
  display: grid;
  gap: 18px;
}

.avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.avatar__actions {
  width: 100%;
  display: flex;
  justify-content: center;
}

.avatar__frame {
  width: min(260px, 70vw);
  background: var(--glass);
  border-radius: var(--radius-xl);
  padding: 18px 16px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.avatar__svg {
  width: 100%;
  height: auto;
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

.avatar__status {
  font-size: 0.85rem;
  color: var(--ink-2);
}

.avatar__pupil {
  transform-origin: center;
  animation: pupil 6s ease-in-out infinite;
}

.avatar__mouth {
  transition: d 0.4s ease;
}

.avatar__spark {
  animation: blink 4s ease-in-out infinite;
}

.avatar__frame:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(125, 249, 255, 0.35);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.avatar__frame:active {
  transform: translateY(1px) scale(0.99);
}

.avatar__frame.is-interacting .avatar__spark {
  animation: blink 1.2s ease-in-out infinite;
}

.avatar__frame.is-interacting .avatar__pupil {
  animation: pupil 2.5s ease-in-out infinite;
}

.avatar__frame.is-interacting .avatar__svg {
  animation: float 2.2s ease-in-out infinite;
}

.avatar__frame.is-interacting .avatar__mouth {
  d: path("M90 150 Q120 175 150 150");
}

.dialog {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bubble {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid rgba(125, 249, 255, 0.12);
  box-shadow: var(--shadow);
  font-size: 1.05rem;
  line-height: 1.35;
  position: relative;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 24px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  background: var(--card);
  border-left: 1px solid rgba(125, 249, 255, 0.12);
  border-bottom: 1px solid rgba(125, 249, 255, 0.12);
  transform: rotate(45deg);
}

.bubble--agent {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(22, 34, 48, 0.92), rgba(10, 16, 24, 0.95));
}

.content {
  display: grid;
  gap: 12px;
}

.card {
  background: var(--glass);
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
}

.card h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.label {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.input {
  width: 100%;
  background: rgba(8, 12, 18, 0.7);
  border: 1px solid rgba(125, 249, 255, 0.2);
  color: var(--ink-0);
  padding: 14px 12px;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
}

.input:focus {
  border-color: var(--accent-0);
  box-shadow: 0 0 0 2px rgba(125, 249, 255, 0.15);
}

.btn-row {
  display: grid;
  gap: 10px;
}

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

.btn-row.inline .btn {
  flex: 0 0 auto;
}

.btn-row.inline.back-next {
  flex-wrap: nowrap;
}

.btn-row.inline.back-next .back-btn {
  flex: 0 0 15%;
  min-width: 48px;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
}

.btn-row.inline.back-next .next-btn {
  flex: 1 1 85%;
}

.people-row {
  flex-wrap: nowrap;
  overflow-x: auto;
}

.people-row .btn {
  flex: 1 1 0;
  min-width: 44px;
}

.date-summary {
  font-size: 0.95rem;
  color: var(--ink-1);
}

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

.date-month {
  font-family: var(--font-title);
  font-size: 1rem;
  color: var(--ink-0);
}

.icon-btn {
  border: 1px solid rgba(125, 249, 255, 0.2);
  background: rgba(10, 16, 24, 0.7);
  color: var(--ink-0);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.date-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  font-size: 0.7rem;
  color: var(--ink-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
  margin-top: 6px;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 6px;
}

.date-cell {
  border: 1px solid rgba(125, 249, 255, 0.15);
  background: rgba(10, 16, 24, 0.7);
  color: var(--ink-0);
  border-radius: 12px;
  padding: 10px 0;
  text-align: center;
  cursor: pointer;
  font-family: var(--font-title);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.date-cell.empty {
  border-color: transparent;
  background: transparent;
  cursor: default;
}

.date-cell.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.date-cell.selected {
  border-color: rgba(125, 249, 255, 0.6);
  box-shadow: 0 0 0 2px rgba(125, 249, 255, 0.25);
}

.date-cell.range {
  background: rgba(125, 249, 255, 0.08);
}

.date-day {
  font-size: 0.95rem;
}

.input-row {
  position: relative;
  display: flex;
  align-items: center;
}

.input-row .input {
  padding-right: 44px;
}

.input-status {
  position: absolute;
  right: 14px;
  font-size: 1.1rem;
  color: var(--ink-2);
}

.input-status.ok {
  color: var(--ok);
}

.input-status.bad {
  color: var(--danger);
}

.btn {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: var(--font-title);
  font-size: 1rem;
  color: #051017;
  background: linear-gradient(135deg, var(--accent-0), var(--accent-2));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.selected {
  box-shadow: 0 0 0 2px rgba(125, 249, 255, 0.5);
  transform: translateY(-1px);
}

.btn.secondary {
  background: rgba(125, 249, 255, 0.12);
  color: var(--ink-0);
  border: 1px solid rgba(125, 249, 255, 0.2);
}

.btn:active {
  transform: scale(0.98);
}

.badge {
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125, 249, 255, 0.2);
  color: var(--ink-1);
  width: fit-content;
}

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

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(6, 10, 14, 0.65);
  border: 1px solid rgba(125, 249, 255, 0.12);
}

.helper {
  font-size: 0.9rem;
  color: var(--ink-2);
}

.helper.warn {
  color: var(--danger);
  font-weight: 600;
}

.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 20;
}

.action-btn {
  border: none;
  background: linear-gradient(135deg, rgba(125, 249, 255, 0.2), rgba(29, 134, 255, 0.18));
  color: var(--ink-0);
  padding: 12px 18px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(125, 249, 255, 0.28);
  font-family: var(--font-title);
  letter-spacing: 0.02em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.restart-btn {
  position: absolute;
  left: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  z-index: 2;
}

.restart-btn svg {
  display: block;
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn[data-variant="danger"] {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.18), rgba(255, 141, 141, 0.16));
  border-color: rgba(255, 107, 107, 0.4);
}

.notice {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.9rem;
}

.notice.ok {
  background: rgba(66, 217, 143, 0.12);
  color: var(--ok);
  border: 1px solid rgba(66, 217, 143, 0.3);
}

.notice.warn {
  background: rgba(255, 107, 107, 0.1);
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.total-card {
  background: rgba(12, 20, 30, 0.8);
  border: 1px solid rgba(125, 249, 255, 0.25);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--ink-0);
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

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

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.modal__content {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
  min-width: 260px;
  max-width: 90vw;
  display: grid;
  gap: 10px;
}

.modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

#roomShareConfirm{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes blink {
  0%, 95%, 100% { opacity: 1; }
  97% { opacity: 0.2; }
}

@keyframes pupil {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(2px, -1px); }
  75% { transform: translate(-1px, -2px); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.app[data-state="processing"] .avatar__mouth {
  d: path("M90 155 Q120 140 150 155");
}

.app[data-state="processing"] .avatar__spark {
  animation: blink 1.5s ease-in-out infinite;
}

.app[data-state="success"] .avatar__mouth {
  d: path("M85 150 Q120 185 155 150");
}

.app[data-state="error"] .avatar__mouth {
  d: path("M85 165 Q120 140 155 165");
}

@media (min-width: 860px) {
  .app {
    padding: 30px 40px 80px;
  }

  .app__main {
    grid-template-columns: 1fr 1.4fr;
    align-items: start;
  }

  .avatar {
    justify-content: flex-start;
  }
}
