/*
 * style.css
 *
 * Global stylesheet for the invitation application. Uses a neutral beach‑inspired
 * colour palette derived from Cove Drift, Tides Edge, Salted Sand, Seaside Oak
 * and Sandy Drift. The layout is intentionally simple and responsive.
 */

/* Colour palette */
:root {
  --cove-drift: #bcae98;
  --tides-edge: #553927;
  --salted-sand: #d9d3c5;
  --seaside-oak: #705b46;
  --sandy-drift: #a38c70;
  --text-dark: #3a2a1f;
  --text-light: #fdfdfd;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--salted-sand);
  color: var(--text-dark);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

main {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
}

/* Flash messages */
.flash-messages {
  margin-bottom: 1rem;
}
.flash {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.flash.success {
  background: #d4edda;
  color: #155724;
}
.flash.error {
  background: #f8d7da;
  color: #721c24;
}

/* Admin dashboard */
.admin-dashboard h1 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.admin-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 900px) {
  .admin-grid {
    flex-direction: row;
    align-items: flex-start;
  }
}

.form-container,
.table-container {
  background: var(--cove-drift);
  padding: 1.5rem;
  border-radius: 8px;
  flex: 1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-container h2,
.table-container h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--tides-edge);
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.form-group input,
.form-group textarea {
  padding: 0.5rem;
  border: 1px solid var(--seaside-oak);
  border-radius: 4px;
  background: var(--salted-sand);
  color: var(--tides-edge);
}

.btn {
  display: inline-block;
  background: var(--seaside-oak);
  color: var(--text-light);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover {
  background: var(--tides-edge);
}

/* Table */
.invite-table {
  width: 100%;
  border-collapse: collapse;
}
.invite-table th,
.invite-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--salted-sand);
  text-align: left;
}
.invite-table th {
  background: var(--seaside-oak);
  color: var(--text-light);
}
.invite-table tr:nth-child(even) {
  background: var(--salted-sand);
}

.copy-btn {
  background: var(--sandy-drift);
  color: var(--text-dark);
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
}
.copy-btn:hover {
  background: var(--seaside-oak);
  color: var(--text-light);
}

/* Invitation card */
.invite-card {
  max-width: 600px;
  margin: 0 auto;
  background: var(--cove-drift);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.invite-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

.invite-header h1 {
  margin: 0;
  font-family: 'Georgia', serif;
  font-size: 2rem;
  color: var(--tides-edge);
}
.guest-name {
  margin-top: 0.25rem;
  font-style: italic;
  color: var(--seaside-oak);
}

.invite-body p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.event-date,
.location,
.personal-message {
  color: var(--tides-edge);
}

.qr-container {
  margin-top: 1.5rem;
  text-align: center;
}
.qr-container img {
  width: 150px;
  height: 150px;
}
.qr-container p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--seaside-oak);
}