/* MyPromptPro Connect — app styles */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  background:
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.10) 0%, transparent 55%),
    linear-gradient(180deg, #0a0a0c 0%, #1a1612 100%);
  color: #e8e6e3;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  padding-bottom: 80px; /* room for tab bar */
}

a { color: #d4af37; text-decoration: none; }
a:hover { text-decoration: underline; }

button { font-family: inherit; cursor: pointer; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(10, 10, 12, 0.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.app-header .brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.3rem;
  letter-spacing: 0.5px;
}
.app-header .brand img { height: 28px; width: 28px; border-radius: 6px; }
.app-header .brand strong { color: #d4af37; font-weight: 600; }

main {
  max-width: 540px;
  margin: 0 auto;
  padding: 1.25rem;
}

.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  margin: 0 0 0.4rem 0;
  color: #f0ead6;
  font-weight: 500;
}
.section-sub {
  color: rgba(232, 230, 227, 0.55);
  font-size: 0.9rem;
  margin: 0 0 1.25rem 0;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.9rem;
}
.card.empty {
  text-align: center;
  color: rgba(232, 230, 227, 0.4);
  font-style: italic;
  padding: 2rem 1rem;
}

/* First-run welcome */
.card.welcome { text-align: center; padding: 2rem 1.4rem; }
.welcome-heart { font-size: 2.4rem; margin-bottom: 0.6rem; }
.welcome-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.45rem; font-weight: 500; color: #f0ead6;
  margin: 0 0 1.2rem;
}
.welcome-steps { text-align: left; max-width: 320px; margin: 0 auto 1.5rem; }
.welcome-steps .step {
  display: flex; align-items: flex-start; gap: 0.7rem;
  font-size: 0.92rem; color: rgba(232, 230, 227, 0.8);
  margin-bottom: 0.8rem; line-height: 1.45;
}
.step-num {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(212, 175, 55, 0.18); color: #d4af37;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 600;
}
.btn.big { padding: 1rem 1.2rem; font-size: 1.05rem; }

/* Due-today states */
.due-banner {
  background: rgba(80, 200, 120, 0.10);
  border: 1px solid rgba(80, 200, 120, 0.35);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  color: #7fd99f; font-size: 0.92rem; font-weight: 500;
  margin-bottom: 1rem;
}
.card.recipient-row.due { border-color: rgba(80, 200, 120, 0.45); }
.due-dot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  background: #50c878; margin-left: 0.45rem; vertical-align: middle;
  box-shadow: 0 0 6px rgba(80, 200, 120, 0.8);
}
.btn.done { border-color: rgba(80, 200, 120, 0.4); color: #7fd99f; }

.recipient-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  flex-wrap: wrap;
}
.recipient-row .who { flex: 1; min-width: 160px; }
.recipient-row .name {
  font-weight: 500; font-size: 1.05rem; color: #f0ead6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.recipient-row .meta {
  font-size: 0.78rem; color: rgba(232, 230, 227, 0.5);
  margin-top: 2px;
}
.recipient-row .actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

label {
  display: block;
  font-size: 0.82rem;
  color: rgba(232, 230, 227, 0.7);
  margin: 1rem 0 0.4rem 0;
  letter-spacing: 0.3px;
}

input[type="text"], input[type="tel"], input[type="time"], select, textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 8px;
  color: #f0ead6;
  font-size: 1rem;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #d4af37;
  background: rgba(255, 255, 255, 0.06);
}
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }

.row-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.1rem;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.08);
  color: #f0ead6;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover, .btn:active { background: rgba(212, 175, 55, 0.18); }
.btn.primary {
  background: linear-gradient(180deg, #d4af37, #b8932f);
  border-color: transparent;
  color: #1a1612;
  font-weight: 600;
}
.btn.primary:hover { background: linear-gradient(180deg, #e6c247, #c89c33); }
.btn.danger {
  border-color: rgba(220, 80, 80, 0.4);
  color: #f5b8b8;
}
.btn.danger:hover { background: rgba(220, 80, 80, 0.15); }
.btn.full { width: 100%; }
.btn.tiny { padding: 0.4rem 0.7rem; font-size: 0.8rem; }

.preview-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  margin: 0.8rem 0;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #f0ead6;
  white-space: pre-wrap;
}
.preview-card .preview-meta {
  font-size: 0.72rem;
  color: rgba(212, 175, 55, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  z-index: 20;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-bar button {
  flex: 1;
  padding: 0.85rem 0.4rem 0.6rem;
  background: none;
  border: none;
  color: rgba(232, 230, 227, 0.78);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  -webkit-tap-highlight-color: transparent;
}
.tab-bar button.active { color: #d4af37; }
.tab-bar button.active .tab-icon { transform: scale(1.1); }
.tab-bar .tab-icon {
  font-size: 1.45rem;
  line-height: 1;
  transition: transform 0.15s;
}

.toast {
  position: fixed;
  bottom: 90px; left: 50%; transform: translateX(-50%);
  padding: 0.7rem 1.2rem;
  background: rgba(212, 175, 55, 0.95);
  color: #1a1612;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  animation: toast 2.4s ease forwards;
}
@keyframes toast {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  10%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -10px); }
}

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(240, 234, 214, 0.2);
  border-top-color: #d4af37;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.install-banner {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-size: 0.82rem;
  color: rgba(232, 230, 227, 0.85);
  margin-bottom: 1rem;
}
.install-banner strong { color: #d4af37; }
.install-banner .close {
  float: right;
  background: none; border: none;
  color: rgba(232, 230, 227, 0.5);
  font-size: 1.1rem; line-height: 1;
  padding: 0 0 0 0.5rem;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  background: rgba(212, 175, 55, 0.15);
  color: #d4af37;
  margin-right: 0.3rem;
  letter-spacing: 0.3px;
}

hr {
  border: none;
  border-top: 1px solid rgba(212, 175, 55, 0.12);
  margin: 1.4rem 0;
}

footer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(232, 230, 227, 0.35);
  padding: 1.5rem 1rem 0.5rem;
}
