* {
  box-sizing: border-box;
}

body {
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  margin: 0;
  background: radial-gradient(circle at 20% 20%, #f2f5ff, #f7f8fb), linear-gradient(135deg, #e6f0ff 0%, #f9fbff 50%, #ffffff 100%);
  color: #0f172a;
  min-height: 100vh;
}

.layout-shell {
  display: block;
  min-height: 100vh;
}

.page {
  max-width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 28px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

h1 {
  margin: 8px 0;
  font-size: 32px;
  letter-spacing: -0.4px;
}

.lede {
  margin: 0;
  color: #cbd5e1;
  max-width: 620px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #94a3b8;
  margin: 0;
}

.hint {
  color: #64748b;
  font-size: 12px;
  margin-top: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px;
}

.sidebar {
  position: sticky;
  top: 24px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.3);
  height: fit-content;
}

.sidebar-head h3 {
  margin: 4px 0 0;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  width: 100%;
  text-align: left;
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  border: 1px solid transparent;
  box-shadow: none;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.content {
  min-height: 70vh;
  padding: 8px 6px 48px;
  max-width: 1100px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 16px;
}

.pill.muted {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.pill.muted .ghost {
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.5);
}

.panel {
  background: #ffffff;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
  margin-bottom: 18px;
}

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

.list {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
}

.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 8px;
  background: #f8fafc;
}

.list .muted {
  color: #94a3b8;
}

.inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

input[type="time"],
input[type="text"],
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  min-height: 44px;
}

select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafc;
  color: #0f172a;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  background-image: linear-gradient(45deg, transparent 50%, #0f172a 50%), linear-gradient(135deg, #0f172a 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select:focus,
input:focus,
textarea:focus {
  outline: 2px solid #c7d2fe;
  border-color: #a5b4fc;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #0f172a;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #4338ca, #6366f1);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

button:hover {
  transform: translateY(-1px);
}

.ghost {
  background: transparent;
  color: #0f172a;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.06);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

.block {
  display: block;
  width: 100%;
  text-align: center;
}

.pill-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.hidden {
  display: none !important;
}

.stacked {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.log {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 12px;
  min-height: 120px;
  overflow: auto;
  font-size: 12px;
  font-family: 'Space Grotesk', monospace;
  margin: 0;
}

.auth {
  min-width: 260px;
}

#toast {
  position: fixed;
  top: 16px;
  right: 16px;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  z-index: 1000;
}

.preview {
  margin-top: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#preview-extra ol {
  margin: 0;
  padding-left: 20px;
  color: #0f172a;
}

#preview-extra li {
  margin-bottom: 6px;
}

#phone-mock {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 16px;
  padding: 12px;
  margin-top: 12px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.35);
}

.phone-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.phone-header .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #0f172a;
}

.phone-header .meta .name {
  font-weight: 700;
}

.phone-header .meta .sub {
  font-size: 12px;
  color: #cbd5e1;
}

.phone-header .dots {
  margin-left: auto;
}

.phone-image img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111827;
}

.phone-images {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #111827;
}

.phone-slide {
  display: none;
}

.phone-slide.active {
  display: block;
}

.phone-slide img {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.phone-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 8px 0;
}

.phone-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.4);
  cursor: pointer;
}

.phone-dots .dot.active {
  background: #e2e8f0;
}

.phone-arrows {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
}

.phone-arrows .arrow {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: none;
}

.phone-arrows .arrow:hover {
  transform: none;
}

.phone-placeholder {
  padding: 24px;
  text-align: center;
  color: #cbd5e1;
}

.phone-status {
  margin-top: 6px;
}

#phone-time {
  color: #cbd5e1;
}

.phone-actions {
  display: flex;
  gap: 10px;
  margin: 8px 0;
}

.phone-actions .save {
  margin-left: auto;
}

.phone-caption .name {
  font-weight: 700;
}

.phone-caption {
  font-size: 14px;
  color: #e2e8f0;
}

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

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(135deg, #6366f1, #22c55e);
  border-radius: 999px;
  transition: width 0.25s ease;
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .actions {
    flex-direction: column;
  }
  .layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .sidebar {
    position: relative;
    top: 0;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .nav-item {
    flex: 1;
    text-align: center;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}
