body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #1d59b9;
}

header {
  background: #2d6cdf;
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.4rem;
}

.signout {
  color: white;
  text-decoration: none;
  border: 1px solid white;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 14px;
}

main {
  padding: 0 16px 16px;
  max-width: 600px;
  margin: 0 auto;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 0;
}

.messages li {
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 14px;
  margin: 10px 0;
}

label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

input,
textarea,
button {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 12px;
}

button {
  background: #2d6cdf;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.messages img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  margin-top: 8px;
}

.messages p { margin: 6px 0 0; }

.time { color: #888; margin-left: 6px; }

.download {
  display: inline-block;
  margin-top: 6px;
  font-size: 14px;
}

.error { color: #fff; background: #c0392b; padding: 8px 12px; border-radius: 8px; }

.actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 14px;
}

.actions form { margin: 0; }

.link-button {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  color: #e7e2e1;
  font-size: 14px;
}

.edit-photo {
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

header > div { display: flex; gap: 8px; }

.link-button.approve { color: #e8edea; }

main p { color: white; }
.messages p { color: inherit; }

main > a,
main > a:visited {
  color: white;
  font-weight: bold;
  display: inline-block;
  margin-top: 8px;
}

/* Small text-style buttons (Delete, Approve, Reject) */
.actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 14px;
}

.actions form { margin: 0; }

.actions .link-button {
  width: auto;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  color: #c0392b;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.actions .link-button.approve { color: #1e8449; }

/* Headings on the blue background */
main h2 { color: white; }

.quote {
  display: block;
  background: #eef3fc;
  border-left: 3px solid #2d6cdf;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #444;
  text-decoration: none;
}

.replying {
  background: #eef3fc;
  border-left: 3px solid #2d6cdf;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 12px 0;
  font-size: 14px;
  color: #333;
}

.replying a { margin-left: 8px; color: #c0392b; }

/* Highlight the original when you tap a quote */
.messages li:target {
  outline: 3px solid #f1c40f;
  scroll-margin-top: 80px;
}

/* ---------- Sign-in / sign-up pages ---------- */
body.auth {
  min-height: 100vh;
  background: linear-gradient(160deg, #2d6cdf 0%, #1d3f8f 100%);
}

body.auth header { display: none; }

body.auth main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 16px;
  box-sizing: border-box;
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  box-sizing: border-box;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: #eef3fc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.auth-title {
  text-align: center;
  margin: 0;
  font-size: 1.6rem;
  color: #1a1a1a;
}

.auth-subtitle {
  text-align: center;
  margin: 4px 0 24px;
  color: #777 !important;
}

.auth-card label {
  color: #333 !important;
  font-size: 14px;
}

.auth-card input {
  border: 1.5px solid #d6dce8;
  border-radius: 12px;
  background: #f8faff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-card input:focus {
  outline: none;
  border-color: #2d6cdf;
  box-shadow: 0 0 0 4px rgba(45, 108, 223, 0.15);
  background: white;
}

.auth-card button {
  margin-top: 8px;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 17px;
  box-shadow: 0 6px 14px rgba(45, 108, 223, 0.35);
}

.auth-card button:active { transform: scale(0.98); }

.auth-switch {
  text-align: center;
  margin: 20px 0 0;
  font-size: 14px;
  color: #666 !important;
}

.auth-switch a { color: #2d6cdf; font-weight: 600; }

body.auth .flash { max-width: 400px; margin: 0 auto 12px; width: 100%; box-sizing: border-box; }

.auth-card button.secondary {
  background: white;
  color: #2d6cdf;
  border: 1.5px solid #2d6cdf;
  box-shadow: none;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}
.badge.admin { background: #eef3fc; color: #2d6cdf; }
.badge.off   { background: #fdecea; color: #c0392b; }
.badge.you   { background: #eee; color: #555; }

.messages li.inactive { opacity: 0.6; }
.invite-box {
  background: white;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 0 16px;
}
.invite-box p { color: #333 !important; margin: 0 0 8px; font-size: 14px; }
.invite-box input { font-size: 14px; background: #f8faff; }
.invite-box .link-button { width: auto; background: none; border: none; color: #c0392b; padding: 0; font-size: 14px; }

.messages .email { font-size: 13px; color: #777; margin-top: 2px; }

.trial-banner {
  display: block;
  background: #fff6db;
  color: #6b5200;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 12px 0;
  font-size: 14px;
  text-decoration: none;
}
.trial-banner strong { color: #2d6cdf; }

[hidden] { display: none !important; }

.voice { margin-bottom: 12px; }
#record-btn { background: white; color: #2d6cdf; border: 1.5px solid #2d6cdf; }
#voice-panel { background: white; border-radius: 12px; padding: 12px; margin-top: 8px; }
#voice-timer { font-weight: 600; color: #c0392b; }
#voice-panel audio, .voice-msg { width: 100%; margin-top: 8px; }
/* ---------- Slim header with ☰ menu ---------- */
header {
  position: sticky;           /* stays at the top while you scroll */
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
}

header h1 {
  margin: 0;
  font-size: 1.15rem;
  white-space: nowrap;        /* one line only... */
  overflow: hidden;
  text-overflow: ellipsis;    /* ...long names end with "…" */
  min-width: 0;
}

.menu { position: relative; flex-shrink: 0; }

.menu summary {
  list-style: none;           /* hide the default ▶ arrow */
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 8px;
  color: white;
  position: relative;
}
.menu summary::-webkit-details-marker { display: none; }  /* hide arrow in Safari */
.menu[open] summary { background: rgba(255, 255, 255, 0.2); }

.menu .dot {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #e74c3c;
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 1px 5px;
}

.menu nav {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  min-width: 200px;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.menu nav a {
  color: #1a1a1a;
  text-decoration: none;
  padding: 12px 16px;
  font-size: 16px;
}
.menu nav a:active { background: #eef3fc; }

.menu-user {
  padding: 8px 16px 10px;
  font-size: 13px;
  color: #777;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
}

.menu nav .menu-signout {
  color: #c0392b;
  border-top: 1px solid #eee;
  margin-top: 4px;
}
/* Sunset background with leafy green and yellow glows */
html {
  min-height: 100%;
  background:
    /* yellow-green glow, top right (like the bright leaves) */
    radial-gradient(circle at 85% 12%, rgba(205, 220, 57, 0.75) 0%, rgba(205, 220, 57, 0) 35%),
    /* green glow, top left */
    radial-gradient(circle at 10% 22%, rgba(67, 160, 71, 0.80) 0%, rgba(67, 160, 71, 0) 40%),
    /* teal-green glow, middle */
    radial-gradient(circle at 70% 45%, rgba(0, 191, 165, 0.55) 0%, rgba(0, 191, 165, 0) 38%),
    /* yellow glow, lower left (toward the orange) */
    radial-gradient(circle at 20% 80%, rgba(253, 216, 53, 0.55) 0%, rgba(253, 216, 53, 0) 35%),
    /* the base sunset */
    linear-gradient(180deg, #1e2a78 0%, #5b1f8f 40%, #c2185b 75%, #e8630a 100%);
  background-attachment: fixed;
}
body, body.auth { background: transparent; }
main label { color: white; }
header { background: #1e2a78; }
/* ---------- Sign-in card in the sunset theme ---------- */
.auth-card {
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(20, 10, 60, 0.45);
}

/* Logo tile: soft purple-to-pink */
.auth-logo {
  background: linear-gradient(135deg, #ede4fb, #fde4ee);
}

/* Sign in button: the background's purple-to-magenta, as a pill */
.auth-card button {
  background: linear-gradient(90deg, #5b1f8f, #c2185b);
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(194, 24, 91, 0.35);
}

/* "Start a free trial" link */
.auth-switch a { color: #c2185b; }

/* Input glow when tapped: purple instead of blue */
.auth-card input:focus {
  border-color: #5b1f8f;
  box-shadow: 0 0 0 4px rgba(91, 31, 143, 0.15);
}
/* ---------- Chat buttons in the sunset theme ---------- */

/* Send (and "Send voice message"): purple-to-magenta pill */
#compose button[type="submit"],
#voice-send {
  background: linear-gradient(90deg, #5b1f8f, #c2185b);
  color: white;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Record: white pill with a magenta outline */
#record-btn {
  background: white;
  color: #c2185b;
  border: 2px solid #c2185b;
  border-radius: 999px;
  font-weight: 600;
}

/* Gentle press effect on both */
#compose button[type="submit"]:active,
#voice-send:active,
#record-btn:active { transform: scale(0.98); }

/* "no file selected" text: readable on the dark background */
#photo { color: white; }
.badge.owner { background: #fde4ee; color: #c2185b; }
.forgot { text-align: right; margin: -4px 0 12px; font-size: 14px; }
.forgot a { color: #c2185b; text-decoration: none; font-weight: 600; }