/* ===========================
   isnotus — South Wind Theme
   Named for Notus, Greek god
   of the warm south wind

   Light, warm, breezy — like a
   Mediterranean afternoon
   =========================== */

:root {
  --wind-sky: #FBF8F3;
  --wind-sand: #F3EDE4;
  --wind-dune: #E8DFD2;
  --wind-shore: #D6CDBF;
  --wind-drift: #B8AD9C;
  --wind-stone: #8A7E6E;
  --wind-earth: #5C5346;
  --wind-deep: #3B352C;
  --wind-amber: #C4892E;
  --wind-amber-hover: #B07A25;
  --wind-amber-light: rgba(196, 137, 46, 0.10);
  --wind-sunset: #C47A4A;
  --wind-terracotta: #B5654A;
  --wind-green: #5E9E5E;
  --wind-green-light: #EDF5ED;
  --wind-red: #B85454;
  --wind-red-light: #F5EDED;
  --wind-mine-bubble: #EDE5D6;
  --wind-white: #FFFFFF;
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Slideshow (public homepage) ===== */

.slideshow-page body,
body.slideshow-page {
  overflow: hidden;
}

.slideshow-page #slideshow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.slideshow-page .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slideshow-page .slide.active {
  opacity: 1;
}

/* ===== Landing page (pre-login /us/) ===== */

.landing-page {
  background: var(--wind-sky);
  color: var(--wind-earth);
  overflow-y: auto;
}

.landing {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.landing h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--wind-deep);
}

.landing .subtitle {
  font-size: 1.1rem;
  color: var(--wind-stone);
  margin-bottom: 40px;
}

.coming-soon h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--wind-deep);
}

.feature-card {
  background: var(--wind-white);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(90, 80, 65, 0.08);
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wind-amber);
  margin-bottom: 6px;
}

.feature-card p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--wind-earth);
}

.status-note {
  margin-top: 32px;
  font-size: 0.9rem;
  color: var(--wind-stone);
  font-style: italic;
}

.tech-details {
  margin-top: 32px;
  border-top: 1px solid var(--wind-dune);
  padding-top: 20px;
}

.tech-details summary {
  font-size: 0.9rem;
  color: var(--wind-stone);
  cursor: pointer;
  padding: 8px 0;
}

.tech-details summary:hover {
  color: var(--wind-earth);
}

.details-content {
  margin-top: 16px;
}

.details-content h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wind-deep);
  margin: 20px 0 8px;
}

.details-content h4:first-child {
  margin-top: 0;
}

.details-content ul {
  list-style: none;
  padding: 0;
}

.details-content li {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--wind-earth);
  padding: 4px 0 4px 16px;
  position: relative;
}

.details-content li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  color: var(--wind-amber);
}

.details-content code {
  background: var(--wind-sand);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* ===== Login page ===== */

.login-page {
  background: var(--wind-sky);
  background-image: radial-gradient(ellipse at 50% 100%, rgba(196, 137, 46, 0.08) 0%, transparent 60%);
  color: var(--wind-earth);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-container {
  width: 100%;
  max-width: 380px;
  padding: 40px 24px;
}

.login-container h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--wind-deep);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}

.login-subtitle {
  font-size: 1rem;
  color: var(--wind-stone);
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--wind-stone);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  background: var(--wind-white);
  border: 1px solid var(--wind-shore);
  border-radius: 8px;
  color: var(--wind-deep);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--wind-amber);
  box-shadow: 0 0 0 3px var(--wind-amber-light);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--wind-earth);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--wind-amber);
}

#submit-btn {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--wind-amber);
  color: var(--wind-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 8px;
}

#submit-btn:hover {
  background: var(--wind-amber-hover);
}

#submit-btn:disabled {
  background: var(--wind-shore);
  color: var(--wind-drift);
  cursor: not-allowed;
}

.error-msg {
  background: var(--wind-red-light);
  border: 1px solid #E0BFBF;
  color: var(--wind-red);
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* ===== Home page ===== */

.home-page {
  background: var(--wind-sky);
  color: var(--wind-earth);
  overflow-y: auto;
  min-height: 100vh;
}

.home {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.home-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--wind-deep);
  letter-spacing: 0.02em;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.home-card {
  background: var(--wind-white);
  border-radius: 12px;
  padding: 20px 16px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background 0.15s, box-shadow 0.2s;
  box-shadow: 0 1px 3px rgba(90, 80, 65, 0.08);
}

a.home-card:hover {
  box-shadow: 0 4px 12px rgba(90, 80, 65, 0.12);
}

a.home-card.live {
  border-bottom: 2px solid var(--wind-amber);
}

.home-card.coming-soon {
  opacity: 0.5;
}

.home-card .card-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.home-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wind-deep);
  margin-bottom: 4px;
}

.home-card p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--wind-stone);
}

.home-card .badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.7rem;
  color: var(--wind-stone);
  background: var(--wind-sand);
  padding: 2px 8px;
  border-radius: 4px;
}

.admin-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--wind-dune);
}

.admin-section h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wind-stone);
  margin-bottom: 12px;
}

.admin-card {
  border: 1px solid var(--wind-dune);
}

/* ===== Chat page ===== */

.chat-page {
  background: var(--wind-sand);
  color: var(--wind-earth);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header,
.chores-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--wind-white);
  border-bottom: 1px solid var(--wind-dune);
  flex-shrink: 0;
}

.chat-header h1,
.chores-header h1 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--wind-deep);
}

.chat-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-nav a,
.nav-btn {
  font-size: 0.85rem;
  color: var(--wind-stone);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}

.chat-nav a:hover,
.nav-btn:hover {
  color: var(--wind-deep);
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

#message-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.message {
  max-width: 80%;
  padding: 8px 12px;
  background: var(--wind-white);
  border-radius: 12px;
  animation: none;
  box-shadow: 0 1px 2px rgba(90, 80, 65, 0.06);
}

.message.mine {
  align-self: flex-end;
  background: var(--wind-mine-bubble);
}

.message.msg-new {
  animation: fadeIn 0.2s ease-in;
}

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

@keyframes gentleBreeze {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.msg-name {
  font-size: 0.8rem;
  font-weight: 600;
}

.msg-time {
  font-size: 0.7rem;
  color: var(--wind-drift);
}

.msg-body {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--wind-deep);
  white-space: pre-wrap;
  word-break: break-word;
}

.msg-image {
  max-width: 280px;
  max-height: 280px;
  border-radius: 8px;
  margin-top: 4px;
  cursor: pointer;
}

.typing-indicator {
  font-size: 0.8rem;
  color: var(--wind-drift);
  padding: 4px 0;
  font-style: italic;
  animation: gentleBreeze 2.5s ease-in-out infinite;
}

.load-more {
  text-align: center;
  padding: 12px;
}

.load-more button {
  background: var(--wind-white);
  color: var(--wind-stone);
  border: 1px solid var(--wind-shore);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.load-more button:hover {
  background: var(--wind-dune);
}

.chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  background: var(--wind-white);
  border-top: 1px solid var(--wind-dune);
  flex-shrink: 0;
}

.chat-input-area textarea {
  flex: 1;
  background: var(--wind-sky);
  border: 1px solid var(--wind-shore);
  border-radius: 20px;
  padding: 10px 16px;
  font-size: 1rem;
  color: var(--wind-deep);
  resize: none;
  outline: none;
  max-height: 120px;
  line-height: 1.4;
  font-family: inherit;
}

.chat-input-area textarea:focus {
  border-color: var(--wind-amber);
  box-shadow: 0 0 0 3px var(--wind-amber-light);
}

.attach-btn,
.send-btn {
  background: none;
  border: none;
  color: var(--wind-drift);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.send-btn {
  color: var(--wind-amber);
}

.send-btn:disabled {
  color: var(--wind-shore);
  cursor: default;
}

.attach-btn:hover,
.send-btn:hover:not(:disabled) {
  background: var(--wind-sand);
}

/* ===== Push notification prompt ===== */

.push-prompt {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--wind-white);
  border: 1px solid var(--wind-dune);
  border-radius: 12px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--wind-earth);
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(90, 80, 65, 0.15);
}

.push-prompt button {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}

#push-yes {
  background: var(--wind-amber);
  color: var(--wind-white);
}

#push-no {
  background: var(--wind-sand);
  color: var(--wind-stone);
}

/* ===== Chores page ===== */

.chores-page {
  background: var(--wind-sky);
  color: var(--wind-earth);
  overflow-y: auto;
  min-height: 100vh;
}

.chores-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px;
}

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

.chore-card {
  background: var(--wind-white);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(90, 80, 65, 0.08);
}

.chore-card.status-pending {
  border-left: 3px solid var(--wind-amber);
}

.chore-card.status-done {
  border-left: 3px solid var(--wind-sunset);
}

.chore-card.status-verified {
  border-left: 3px solid var(--wind-green);
}

.chore-card.status-rejected {
  border-left: 3px solid var(--wind-red);
}

.chore-card.review {
  border-left: 3px solid var(--wind-sunset);
}

.chore-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.chore-card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--wind-deep);
}

.chore-status {
  font-size: 0.75rem;
  color: var(--wind-stone);
  background: var(--wind-sand);
  padding: 2px 8px;
  border-radius: 4px;
}

.chore-badge {
  font-size: 0.75rem;
  color: var(--wind-stone);
}

.chore-desc {
  font-size: 0.9rem;
  color: var(--wind-earth);
  margin-bottom: 8px;
  line-height: 1.4;
}

.chore-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--wind-drift);
}

.chore-user {
  font-size: 0.85rem;
  font-weight: 600;
}

.admin-note {
  font-size: 0.85rem;
  color: var(--wind-sunset);
  margin-top: 8px;
  font-style: italic;
}

.btn-complete {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--wind-green);
  color: var(--wind-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-complete:hover {
  background: #4E8E4E;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  background: var(--wind-amber);
  color: var(--wind-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 12px;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--wind-amber-hover);
}

.btn-secondary {
  margin-top: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  background: var(--wind-sand);
  color: var(--wind-stone);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-secondary:hover {
  background: var(--wind-dune);
}

/* Admin tabs */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--wind-white);
  color: var(--wind-stone);
  border: 1px solid var(--wind-dune);
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.tab-btn.active {
  background: var(--wind-amber);
  color: var(--wind-white);
  border-color: var(--wind-amber);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Chore create form */
.chore-form {
  background: var(--wind-white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(90, 80, 65, 0.08);
}

.chore-form label {
  display: block;
  font-size: 0.9rem;
  color: var(--wind-stone);
  margin-bottom: 16px;
}

.chore-form input[type="text"],
.chore-form input[type="number"],
.chore-form input[type="date"],
.chore-form textarea,
.chore-form select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: var(--wind-sky);
  border: 1px solid var(--wind-shore);
  border-radius: 8px;
  color: var(--wind-deep);
  outline: none;
  font-family: inherit;
}

.chore-form input:focus,
.chore-form textarea:focus,
.chore-form select:focus {
  border-color: var(--wind-amber);
  box-shadow: 0 0 0 3px var(--wind-amber-light);
}

.chore-form fieldset {
  border: 1px solid var(--wind-shore);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

.chore-form fieldset legend {
  font-size: 0.9rem;
  color: var(--wind-stone);
  padding: 0 8px;
}

.chore-form fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--wind-earth);
}

.chore-form fieldset input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--wind-amber);
}

#custom-days {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 16px;
  padding: 8px 12px;
}

#custom-days label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--wind-earth);
  margin-bottom: 0;
}

.form-msg {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.form-msg.error {
  background: var(--wind-red-light);
  color: var(--wind-red);
}

.form-msg.success {
  background: var(--wind-green-light);
  color: var(--wind-green);
}

/* Review actions */
.review-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.review-note {
  flex: 1;
  padding: 8px 12px;
  font-size: 0.85rem;
  background: var(--wind-sky);
  border: 1px solid var(--wind-shore);
  border-radius: 8px;
  color: var(--wind-deep);
  outline: none;
}

.btn-approve {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--wind-green);
  color: var(--wind-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.btn-reject {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--wind-red);
  color: var(--wind-white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

/* Points table */
.points-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.points-table th,
.points-table td {
  padding: 10px 12px;
  text-align: left;
  font-size: 0.9rem;
}

.points-table th {
  color: var(--wind-stone);
  border-bottom: 1px solid var(--wind-dune);
  font-weight: 500;
}

.points-table td {
  color: var(--wind-earth);
  border-bottom: 1px solid var(--wind-sand);
}

.empty-msg {
  color: var(--wind-drift);
  font-size: 0.95rem;
  text-align: center;
  padding: 32px 16px;
}
