@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #1f352e;
  --primary-deep: #13241f;
  --secondary-color: #a7774d;
  --secondary-soft: #d9b997;
  --paper: #fffcf7;
  --background: #f4efe7;
  --background-deep: #e9e0d3;
  --text-dark: #1d2723;
  --text-muted: #66706b;
  --text-light: #f8f3eb;
  --line: rgba(31, 53, 46, 0.14);
  --danger: #a94442;
  --success: #337256;
  --warning: #9a6b2f;
  --glass-bg: rgba(255, 252, 247, 0.94);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-shadow: 0 24px 70px rgba(29, 39, 35, 0.11);
  --border-radius: 22px;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Manrope', Arial, sans-serif;
  --transition: 220ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--background);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input {
  font-family: var(--font-body);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--primary-color);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.03;
}

h1 {
  font-size: clamp(4.5rem, 12vw, 9.5rem);
}

h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.025em;
}

h3 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}

p {
  color: var(--text-muted);
  line-height: 1.75;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 10px;
  background: var(--paper);
  padding: 12px 16px;
  color: var(--primary-color);
  text-decoration: none;
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--secondary-soft);
  outline-offset: 3px;
}

.hero-section {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: min(920px, 100svh);
  overflow: hidden;
  background-color: var(--primary-deep);
  background-image:
    linear-gradient(180deg, rgba(10, 23, 18, 0.4) 0%, rgba(10, 23, 18, 0.2) 42%, rgba(10, 23, 18, 0.7) 100%),
    url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=2400&q=92');
  background-position: center 43%;
  background-size: cover;
  color: var(--text-light);
}

.hero-section::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, transparent 0 24%, rgba(9, 22, 17, 0.16) 72%),
    linear-gradient(90deg, rgba(15, 31, 25, 0.24), transparent 28%, transparent 72%, rgba(15, 31, 25, 0.24));
  content: '';
  pointer-events: none;
}

.hero-nav {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  display: flex;
  width: min(100% - 48px, 1180px);
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  transform: translateX(-50%);
}

.monogram {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.monogram span {
  color: var(--secondary-soft);
  font-size: 0.8em;
  font-style: italic;
}

.hero-nav-link {
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--text-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
  text-transform: uppercase;
}

.hero-content {
  position: relative;
  z-index: 1;
  align-self: center;
  justify-self: center;
  width: min(92%, 1050px);
  padding: 120px 24px 100px;
  text-align: center;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--secondary-color);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #ead5bc;
}

.hero-content h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 36px);
  margin: 0;
  color: #fffaf3;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.18));
  font-style: italic;
  letter-spacing: -0.055em;
  line-height: 0.82;
}

.hero-content h1 em {
  color: var(--secondary-soft);
  font-size: 0.52em;
  font-weight: 400;
}

.hero-copy {
  max-width: 570px;
  margin: 34px auto 20px;
  color: rgba(255, 250, 243, 0.9);
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2.2vw, 1.7rem);
  font-style: italic;
  line-height: 1.4;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto 34px;
  color: rgba(255, 250, 243, 0.84);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-meta i {
  color: var(--secondary-soft);
  font-size: 0.6rem;
}

.btn {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  padding: 14px 24px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform var(--transition), background var(--transition), box-shadow var(--transition), color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.btn-hero {
  border: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-hero:hover {
  background: var(--paper);
  color: var(--primary-color);
}

.btn-primary {
  width: 100%;
  background: var(--primary-color);
  box-shadow: 0 12px 26px rgba(31, 53, 46, 0.18);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-deep);
  box-shadow: 0 16px 34px rgba(31, 53, 46, 0.24);
}

.btn-secondary {
  width: 100%;
  background: var(--secondary-color);
  color: #fff;
}

.btn-outline {
  width: 100%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--primary-color);
}

.scroll-cue {
  position: absolute;
  bottom: 26px;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
  color: rgba(255, 250, 243, 0.74);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue i {
  animation: floatDown 1.8s ease-in-out infinite;
}

.wedding-main {
  background:
    radial-gradient(circle at 8% 20%, rgba(167, 119, 77, 0.08), transparent 18%),
    radial-gradient(circle at 93% 62%, rgba(31, 53, 46, 0.07), transparent 20%),
    var(--background);
}

.welcome-section,
.details-section,
.invite-section {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: clamp(82px, 11vw, 150px) 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 58px;
  text-align: center;
}

.section-heading h2 {
  margin-bottom: 24px;
}

.section-heading > p:last-child {
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.02rem;
}

.section-heading-compact {
  margin-bottom: 44px;
}

.story-card {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.58);
  padding: clamp(38px, 7vw, 78px);
  text-align: center;
}

.story-card::before,
.story-card::after {
  position: absolute;
  width: 70px;
  height: 70px;
  border-color: var(--secondary-soft);
  content: '';
  opacity: 0.7;
}

.story-card::before {
  top: 18px;
  left: 18px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.story-card::after {
  right: 18px;
  bottom: 18px;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.story-mark {
  display: block;
  height: 42px;
  color: var(--secondary-color);
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.8;
}

.story-card p {
  max-width: 680px;
  margin: 12px auto 26px;
  color: var(--primary-color);
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  font-style: italic;
  line-height: 1.25;
}

.signature {
  color: var(--secondary-color);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-style: italic;
}

.countdown-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  width: 100%;
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  background: var(--primary-color);
  padding: clamp(64px, 8vw, 100px) max(24px, calc((100vw - 1060px) / 2));
  color: var(--text-light);
}

.date-seal {
  display: grid;
  width: clamp(140px, 18vw, 210px);
  aspect-ratio: 1;
  place-content: center;
  border: 1px solid rgba(217, 185, 151, 0.7);
  border-radius: 50%;
  color: var(--text-light);
  font-family: var(--font-display);
  text-align: center;
}

.date-seal span {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 0.65;
}

.date-seal small {
  margin: 14px 0;
  color: var(--secondary-soft);
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.28em;
}

.countdown-content h2 {
  max-width: 660px;
  margin-bottom: 38px;
  color: var(--text-light);
}

.countdown-note {
  max-width: 590px;
  margin: -16px 0 0;
  color: rgba(248, 243, 235, 0.68);
  font-size: 1rem;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 16px;
  max-width: 680px;
}

.countdown-grid > div {
  border-left: 1px solid rgba(217, 185, 151, 0.32);
  padding-left: 20px;
}

.countdown-grid strong {
  display: block;
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.countdown-grid span {
  color: rgba(248, 243, 235, 0.62);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.countdown-finished {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.info-card {
  position: relative;
  min-height: 380px;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: clamp(34px, 5vw, 58px);
  box-shadow: 0 18px 55px rgba(29, 39, 35, 0.07);
}

.info-card-featured {
  background: var(--primary-color);
}

.info-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 58px;
  place-items: center;
  border: 1px solid var(--secondary-soft);
  border-radius: 50%;
  color: var(--secondary-color);
  font-size: 1.35rem;
}

.card-label {
  margin-bottom: 12px;
  color: var(--secondary-color);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.info-card h3 {
  margin-bottom: 16px;
}

.info-card > p:not(.card-label) {
  margin-bottom: 26px;
}

.info-card-featured h3,
.info-card-featured p {
  color: var(--text-light);
}

.info-card-featured > p:not(.card-label) {
  color: rgba(248, 243, 235, 0.68);
}

.detail-line,
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-link {
  color: var(--secondary-soft);
  text-underline-offset: 5px;
}

.reception-map-link {
  color: var(--secondary-color);
}

.text-link-static {
  text-decoration: none;
}

.invite-section {
  padding-top: 70px;
}

.invite-state {
  max-width: 720px;
  margin: 0 auto;
}

.rsvp-card,
.glass-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  background: var(--glass-bg);
  padding: clamp(30px, 6vw, 58px);
  box-shadow: var(--glass-shadow);
  animation: slideUp 520ms ease-out both;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.rsvp-card::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: 72px;
  height: 3px;
  background: var(--secondary-color);
  content: '';
  transform: translateX(-50%);
}

.rsvp-card h2,
.rsvp-card h3 {
  margin-bottom: 16px;
}

.rsvp-card > p,
.form-intro > p:last-child {
  max-width: 520px;
  margin-right: auto;
  margin-left: auto;
}

.state-icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 28px;
  place-items: center;
  border: 1px solid var(--secondary-soft);
  border-radius: 50%;
  color: var(--secondary-color);
  font-size: 1.8rem;
}

.state-icon-danger {
  border-color: rgba(169, 68, 66, 0.35);
  color: var(--danger);
}

.state-icon-success {
  border-color: rgba(51, 114, 86, 0.35);
  color: var(--success);
}

.loading-icon {
  display: block;
  margin-bottom: 24px;
  color: var(--secondary-color);
  font-size: 3rem;
}

.form-intro {
  margin-bottom: 38px;
}

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

.form-label {
  display: block;
  margin-bottom: 10px;
  color: var(--primary-color);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 15px 17px;
  color: var(--text-dark);
  font-size: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-input::placeholder {
  color: #929993;
}

.form-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(167, 119, 77, 0.12);
}

.photo-upload-container {
  position: relative;
  display: grid;
  min-height: 230px;
  overflow: hidden;
  place-items: center;
  border: 1px dashed rgba(31, 53, 46, 0.32);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  padding: 24px;
  text-align: center;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.photo-upload-container:hover,
.photo-upload-container:focus-within {
  border-color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.85);
}

.photo-upload-container input[type='file'] {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.upload-placeholder {
  display: grid;
  justify-items: center;
}

.upload-placeholder strong {
  margin-bottom: 6px;
  color: var(--primary-color);
  font-size: 0.95rem;
}

.upload-placeholder small,
.qr-ticket small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.upload-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--background);
  color: var(--secondary-color);
  font-size: 1.6rem;
}

.photo-preview {
  display: none;
  width: 176px;
  height: 176px;
  border: 5px solid var(--paper);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(29, 39, 35, 0.16);
}

.photo-upload-container.has-photo {
  border-style: solid;
  background: var(--background);
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.5;
  text-align: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(167, 119, 77, 0.1);
  padding: 8px 14px;
  color: var(--warning);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.8s ease-in-out infinite;
}

.qr-ticket {
  position: relative;
  max-width: 330px;
  margin: 32px auto 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 26px;
  box-shadow: 0 15px 40px rgba(29, 39, 35, 0.1);
}

.qr-ticket::before,
.qr-ticket::after {
  position: absolute;
  top: 242px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--background);
  content: '';
}

.qr-ticket::before {
  left: -12px;
}

.qr-ticket::after {
  right: -12px;
}

#qrcode {
  display: grid;
  min-height: 200px;
  place-items: center;
}

#qrcode img,
#qrcode canvas {
  max-width: 100%;
  height: auto !important;
}

.ticket-divider {
  margin: 22px -26px 20px;
  border-top: 1px dashed var(--line);
}

.qr-ticket h3 {
  margin-bottom: 4px;
  font-size: 1.7rem;
}

.wedding-footer {
  background: var(--primary-deep);
  padding: 72px 24px 96px;
  color: var(--text-light);
  text-align: center;
}

.footer-monogram {
  justify-content: center;
  margin-bottom: 20px;
  font-size: 2.3rem;
}

.wedding-footer p {
  margin-bottom: 8px;
  color: rgba(248, 243, 235, 0.72);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-style: italic;
}

.wedding-footer > span {
  color: var(--secondary-soft);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.mobile-rsvp-bar {
  display: none;
}

/* Shared app screens */
.container {
  width: min(100% - 36px, 1120px);
  margin: 0 auto;
  padding: 28px 0 60px;
}

.app-header {
  padding: 24px 0 34px;
  text-align: center;
}

.app-logo {
  color: var(--primary-color);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
}

.table-container {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f7f4ef;
  color: var(--primary-color);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-pending {
  background: #f4ead8;
  color: #755323;
}

.badge-approved {
  background: #deeee5;
  color: #285c45;
}

.badge-submitted {
  background: #e1ebf1;
  color: #31576c;
}

.badge-rejected {
  background: #f3dfde;
  color: #873d3b;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  padding: 24px;
  box-shadow: 0 12px 32px rgba(29, 39, 35, 0.06);
  text-align: center;
}

.dash-card h3 {
  margin-bottom: 5px;
  color: var(--secondary-color);
  font-family: var(--font-body);
  font-size: 2rem;
  font-weight: 600;
}

.dash-card p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.scanner-container {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--glass-shadow);
}

#reader {
  width: 100%;
}

.validation-card {
  display: none;
  border-radius: var(--border-radius);
  background: #fff;
  padding: clamp(28px, 6vw, 48px);
  box-shadow: var(--glass-shadow);
  text-align: center;
}

.validation-card.valid {
  border-top: 5px solid var(--success);
}

.validation-card.invalid {
  border-top: 5px solid var(--danger);
}

.validation-photo,
.photo-thumb {
  border-radius: 50%;
  object-fit: cover;
}

.validation-photo {
  width: 132px;
  height: 132px;
  margin: 18px auto;
  border: 4px solid var(--primary-color);
}

.photo-thumb {
  width: 48px;
  height: 48px;
}

.photo-placeholder {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--background);
  color: var(--secondary-color);
}

.admin-page {
  background:
    radial-gradient(circle at 0 0, rgba(167, 119, 77, 0.11), transparent 30%),
    var(--background);
}

.admin-login,
.scanner-login {
  max-width: 430px;
  margin: 0 auto;
}

.admin-list-card {
  padding: clamp(22px, 4vw, 38px);
}

.admin-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.admin-toolbar h3,
.admin-toolbar p {
  margin-bottom: 0;
}

.admin-create-btn {
  width: auto;
  flex: 0 0 auto;
}

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

.btn-small {
  width: auto;
  min-height: 40px;
  padding: 9px 13px;
  font-size: 0.68rem;
  white-space: nowrap;
}

.btn-danger {
  border-color: rgba(169, 68, 66, 0.42);
  color: var(--danger);
}

.scanner-page {
  background:
    radial-gradient(circle at 50% 0, rgba(167, 119, 77, 0.14), transparent 28%),
    #101714;
  color: #fff;
}

.scanner-page .container {
  max-width: 620px;
}

.scanner-page .app-logo,
.scanner-page .glass-card h3,
.scanner-page .validation-card h2,
.scanner-page .validation-card h3 {
  color: #fff;
}

.scanner-page .glass-card,
.scanner-page .validation-card {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(28, 39, 34, 0.92);
  color: #fff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.scanner-page .glass-card p,
.scanner-page .validation-card p {
  color: rgba(255, 255, 255, 0.66);
}

.scanner-page .form-label {
  color: rgba(255, 255, 255, 0.76);
}

.scanner-page .form-input {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.scanner-page .form-input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.scanner-page .state-icon {
  border-color: rgba(217, 185, 151, 0.5);
}

.scanner-instructions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--primary-color);
  padding: 14px 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
}

#reader {
  border: 0 !important;
}

#reader__dashboard_section_csr span {
  color: var(--text-dark) !important;
}

#reader button,
#reader select {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  padding: 8px 12px;
  font-family: var(--font-body);
}

.validation-status-icon {
  display: block;
  margin-bottom: 15px;
  font-size: 5rem;
}

.validation-status-icon.is-valid,
.validation-title.is-valid {
  color: #65c596;
}

.validation-status-icon.is-invalid,
.validation-title.is-invalid {
  color: #ef7672;
}

.validation-photo-placeholder {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.5rem;
}

.validation-photo-invalid {
  border-color: var(--danger);
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 20px;
}

.mb-4 {
  margin-bottom: 20px;
}

.d-none {
  display: none !important;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

@keyframes floatDown {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(5px); }
}

@keyframes pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

@media (max-width: 760px) {
  .hero-section {
    min-height: max(620px, 100svh);
    background-image:
      linear-gradient(180deg, rgba(10, 23, 18, 0.4) 0%, rgba(10, 23, 18, 0.2) 42%, rgba(10, 23, 18, 0.7) 100%),
      url('https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1200&q=88');
    background-position: 54% center;
  }

  .hero-nav {
    width: calc(100% - 36px);
    padding-top: max(20px, env(safe-area-inset-top));
  }

  .hero-content {
    width: 100%;
    padding: 108px 18px 98px;
  }

  .hero-content h1 {
    flex-direction: column;
    gap: 1px;
    font-size: clamp(4.8rem, 24vw, 7.1rem);
    line-height: 0.72;
  }

  .hero-content h1 em {
    margin: 7px 0 2px;
    font-size: 0.34em;
  }

  .hero-copy {
    max-width: 340px;
    margin-top: 28px;
    font-size: 1.25rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 7px;
    margin-bottom: 28px;
    font-size: 0.68rem;
  }

  .hero-meta i {
    display: none;
  }

  .scroll-cue {
    display: none;
  }

  .welcome-section,
  .details-section,
  .invite-section {
    width: min(100% - 32px, 1120px);
    padding: 76px 0;
  }

  .section-heading {
    margin-bottom: 38px;
  }

  .section-heading h2 {
    margin-bottom: 18px;
    font-size: clamp(2.55rem, 13vw, 3.5rem);
  }

  .section-heading > p:last-child {
    font-size: 0.94rem;
  }

  .story-card {
    padding: 42px 24px;
  }

  .story-card::before,
  .story-card::after {
    width: 42px;
    height: 42px;
  }

  .story-card p {
    font-size: 1.68rem;
  }

  .countdown-section {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 68px 20px;
    text-align: center;
  }

  .date-seal {
    width: 132px;
    margin: 0 auto;
  }

  .countdown-content h2 {
    margin-bottom: 30px;
    font-size: 2.7rem;
  }

  .countdown-note {
    margin: -10px auto 0;
  }

  .countdown-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .countdown-grid > div {
    border-left: 0;
    padding: 0 2px;
  }

  .countdown-grid strong {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .countdown-grid span {
    font-size: 0.55rem;
    letter-spacing: 0.08em;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .info-card {
    min-height: 330px;
    padding: 34px 28px;
  }

  .info-icon {
    margin-bottom: 42px;
  }

  .invite-section {
    padding-top: 24px;
  }

  .rsvp-card,
  .glass-card {
    padding: 34px 22px;
    border-radius: 18px;
  }

  .photo-upload-container {
    min-height: 210px;
  }

  .wedding-footer {
    padding-bottom: 130px;
  }

  .mobile-rsvp-bar {
    position: fixed;
    z-index: 50;
    right: 14px;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 14px;
    display: flex;
    min-height: 56px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(31, 53, 46, 0.96);
    box-shadow: 0 14px 34px rgba(19, 36, 31, 0.3);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    text-transform: uppercase;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .container {
    width: min(100% - 24px, 1120px);
    padding-top: 14px;
  }

  .dash-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .admin-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-create-btn {
    width: 100%;
  }

  .dash-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    text-align: left;
  }

  .dash-card h3 {
    margin: 0;
    order: 2;
  }

  .table-container {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  table,
  tbody,
  tr,
  td {
    display: block;
    width: 100%;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody {
    display: grid;
    gap: 14px;
  }

  tbody tr {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    padding: 10px 16px;
  }

  tbody tr:last-child td,
  td {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
    text-align: right;
  }

  td::before {
    color: var(--text-muted);
    content: attr(data-label);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
  }

  td:last-child {
    border-bottom: 0;
  }

  .actions-btn {
    flex-wrap: wrap;
  }

  .actions-btn::before {
    margin-right: auto;
  }
}

@media (max-width: 390px) {
  .hero-content h1 {
    font-size: 4.5rem;
  }

  .hero-copy {
    font-size: 1.08rem;
  }

  .btn {
    padding-right: 18px;
    padding-left: 18px;
    font-size: 0.74rem;
  }

  .countdown-grid strong {
    font-size: 1.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(31, 53, 46, 0.42);
    --text-muted: #45504b;
  }
}

/* Novos Estilos (Lista de Presentes e Imagens) */
.hero-section {
  background: linear-gradient(180deg, rgba(10, 23, 18, 0.7) 0%, rgba(10, 23, 18, 0.2) 40%, rgba(10, 23, 18, 0.8) 100%), url('../Z62_6081.jpg') no-repeat center 58% / cover !important;
}

.countdown-section {
  background: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.62)), url('../WhatsApp Image 2026-08-23 at 17.00.47.jpeg') no-repeat center 28% / cover !important;
  padding: 60px 20px;
  color: white;
  text-align: center;
  border-radius: 20px;
  margin: 40px 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.countdown-section h2 { color: white; margin-bottom: 20px; }

.wedding-footer {
  background: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.82)), url('../Z62_5723.jpg') no-repeat center 32% / cover !important;
  padding: 280px 20px 180px; /* Container bem alto para caber o homem em pé e a mulher sentada */
  text-align: center;
  color: white;
  margin-top: 50px;
  border-radius: 30px 30px 0 0;
}
.wedding-footer h2 { color: white; font-size: 3rem; margin-bottom: 10px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.wedding-footer p { color: rgba(255,255,255,0.9); text-shadow: 0 1px 5px rgba(0,0,0,0.5); }

.gifts-section {
  padding: 60px 20px;
  max-width: 1120px;
  margin: 0 auto;
}
.gift-category {
  margin-bottom: 50px;
}
.gift-category h3 {
  border-bottom: 2px solid var(--secondary-soft);
  padding-bottom: 10px;
  margin-bottom: 25px;
}
.gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.gift-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.gift-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.gift-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 15px;
}
.gift-card h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  flex: 1;
}
.gift-qty {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.btn-gift {
  width: 100%;
  padding: 12px;
  border-radius: 99px;
  border: none;
  background: var(--secondary-color);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.btn-gift:hover {
  background: var(--secondary-soft);
}
.btn-gift:disabled {
  background: #ccc;
  color: #777;
  cursor: not-allowed;
}
