:root {
  --red: #9f2f20;
  --red-dark: #762116;
  --green: #244f20;
  --green-soft: #e9f0e7;
  --gold: #c99a32;
  --ink: #231f1b;
  --paper: #fffdf8;
  --cream: #f4eddd;
  --line: #d9ccb3;
  --shadow: 0 24px 70px rgba(50, 34, 19, .16);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(201, 154, 50, .18), transparent 32rem),
    radial-gradient(circle at 100% 100%, rgba(36, 79, 32, .16), transparent 35rem),
    var(--cream);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M0 47.5h48M47.5 0v48' fill='none' stroke='%239a8660' stroke-width='.35'/%3E%3C/svg%3E");
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.card {
  position: relative;
  width: min(100%, 720px);
  padding: clamp(24px, 5vw, 54px);
  overflow: hidden;
  background: rgba(255, 253, 248, .96);
  border: 1px solid rgba(118, 82, 31, .22);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.card::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(201, 154, 50, .35);
  border-radius: 20px;
}

.login-card { max-width: 520px; text-align: center; }
.crest { width: 160px; max-height: 235px; object-fit: contain; }
.crest-small { width: 112px; max-height: 168px; flex: 0 0 auto; }
.eyebrow {
  margin: 14px 0 8px;
  color: var(--green);
  font-size: .82rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--red-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 9vw, 4.3rem);
  font-weight: 500;
  line-height: .97;
  letter-spacing: -.04em;
}

h1 span { color: var(--gold); font-style: italic; }
.intro { margin: 22px auto 28px; font-size: 1.05rem; line-height: 1.6; color: #5d5144; }

.login-form { display: grid; gap: 10px; text-align: left; }
label { font-size: .94rem; font-weight: 700; }
input[type="password"] {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
input[type="password"]:focus { outline: 3px solid rgba(201, 154, 50, .28); border-color: var(--gold); }
button { font: inherit; }
.login-form button, .primary-button {
  min-height: 54px;
  padding: 13px 20px;
  color: white;
  font-weight: 800;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 10px 24px rgba(118, 33, 22, .22);
  cursor: pointer;
}
.login-form button { margin-top: 8px; }
.primary-button { width: 100%; margin-top: 18px; }
button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.form-error { margin: 2px 0; color: #a52217; font-weight: 700; }

.wedding-header { display: flex; align-items: center; gap: clamp(18px, 4vw, 34px); }
.wedding-header .eyebrow { margin-top: 0; }
.wedding-header h1 { font-size: clamp(2.25rem, 7vw, 3.8rem); }
.upload-intro { max-width: 590px; margin-left: 0; }

.drop-zone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 235px;
  padding: 24px;
  text-align: center;
  border: 2px dashed #bfae8e;
  border-radius: 20px;
  background: linear-gradient(145deg, #fff, #faf6ed);
  transition: .18s ease;
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--green); background: var(--green-soft); transform: translateY(-1px); }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone strong { margin-top: 4px; color: var(--green); font-size: 1.2rem; }
.drop-zone span { color: #786b5c; }
.drop-zone small { margin-top: 13px; color: #827462; }
.upload-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 1.8rem;
  border-radius: 50%;
  background: var(--green);
}

.consent { display: flex; align-items: flex-start; gap: 11px; margin-top: 18px; font-weight: 500; line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); flex: 0 0 auto; }
.selected-summary { margin-top: 17px; padding: 12px 14px; color: var(--green); font-weight: 750; border-radius: 11px; background: var(--green-soft); }
.upload-list { display: grid; gap: 9px; margin-top: 14px; }
.upload-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.upload-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.upload-row span { color: #6f6355; font-size: .86rem; }
.progress-track { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 99px; background: #ebe4d7; }
.progress-bar { width: 0; height: 100%; background: var(--green); transition: width .12s linear; }
.upload-row.success .progress-bar { width: 100% !important; background: var(--green); }
.upload-row.error .progress-bar { background: var(--red); }
.privacy-note { margin: 15px 10px 0; color: #786b5c; font-size: .88rem; line-height: 1.5; text-align: center; }
.logout-form { margin-top: 20px; text-align: center; }
.text-button { padding: 8px; color: #74685a; border: 0; background: transparent; text-decoration: underline; cursor: pointer; }

@media (max-width: 560px) {
  .page { padding: 0; align-items: stretch; }
  .card { min-height: 100vh; border-radius: 0; padding: 26px 20px 34px; }
  .card::after { inset: 7px; border-radius: 0; }
  .wedding-header { align-items: flex-start; }
  .crest-small { width: 82px; max-height: 124px; }
  .wedding-header .eyebrow { font-size: .68rem; letter-spacing: .08em; }
  .drop-zone { min-height: 205px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
