@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

:root{
  --bg:#f6f3ee;
  --card:#ffffff;
  --text:#1a1a1a;
  --muted:#6b6b6b;
  --line:#e6e0d6;
  --accent:#b38a2e;
  --accent-2:#2f4b4a;
  --error:#c02626;
  --radius:18px;
  --shadow:0 18px 40px rgba(26,26,26,.12);
  --shadow-sm:0 10px 24px rgba(26,26,26,.10);
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:"Manrope", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 5% -10%, rgba(179,138,46,.18), transparent 60%),
    radial-gradient(900px 600px at 95% 0%, rgba(47,75,74,.12), transparent 55%),
    var(--bg);
  background-repeat: no-repeat;
  background-size: cover;
}

.wrap{
  max-width:1100px;
  margin:30px auto 64px;
  padding:0 22px;
}

.header{
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:18px;
}

.logo{
  height:52px;
  width:auto;
}

.headerText h1{
  margin:0;
  font-size:28px;
  letter-spacing:-0.01em;
}

.headerText p{
  margin:6px 0 0;
  color:var(--muted);
  font-size:14px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:26px;
}

.section{
  margin-top:20px;
  padding-top:16px;
  border-top:1px solid var(--line);
}

.section:first-of-type{
  margin-top:0;
  padding-top:0;
  border-top:0;
}

.sectionTitle{
  margin:0 0 6px;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:var(--muted);
}

.sub{
  margin:0 0 10px;
  color:var(--muted);
}

.formGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap:18px;
  margin-top:12px;
}

@media (max-width: 860px){
  .header{ flex-direction:column; align-items:flex-start; }
  .formGrid{ grid-template-columns:1fr; }
}

.field{ display:flex; flex-direction:column; gap:6px; }
.field.span2{ grid-column: span 2; }

.label{ font-size:12px; color:var(--muted); }

.input, .textarea, select.input{
  width:100%;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fbfaf8;
  color:var(--text);
  padding:12px 14px;
  font-size:14px;
}
.seasonSelect{
  max-width: 220px;
}

.input:focus, .textarea:focus, select.input:focus{
  outline:2px solid rgba(179,138,46,.18);
  border-color: rgba(179,138,46,.6);
  background:#ffffff;
}

.textarea{ min-height:120px; resize:vertical; }

.rowTight{ display:flex; gap:12px; flex-wrap:wrap; }
.rowTight .input{ flex:1; min-width:180px; }
.moneyRow{ align-items:center; }
.moneyField{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;
  min-width:200px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#f8fafc;
}
.moneyPrefix{
  color:var(--muted);
  font-weight:600;
}
.moneyInput{
  border:0;
  background:transparent;
  padding:0;
  outline:none;
}
.moneyInput:focus{ box-shadow:none; }

.help{ color:var(--muted); font-size:12px; }

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding:12px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fbfaf8;
}

.chips label{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  background:#ffffff;
}

.chips input{ accent-color: var(--accent); }

.actionsRow{
  display:flex;
  align-items:flex-end;
  gap:12px;
  margin-top:18px;
  flex-wrap:wrap;
}

.btn{
  border:1px solid rgba(179,138,46,.5);
  background: linear-gradient(180deg, #c59a3c, #b38a2e);
  color:#ffffff;
  border-radius:12px;
  padding:12px 16px;
  font-weight:600;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
}

.btn:disabled{ opacity:.6; cursor:not-allowed; }

.btnSecondary{
  border:1px solid var(--line);
  background:#f3efe8;
  color:var(--text);
  border-radius:12px;
  padding:12px 16px;
  cursor:pointer;
}

.status{ margin-top:12px; font-size:13px; color:var(--muted); }
.status.error{ color:var(--error); }

.grid{
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap:16px;
  margin-top:22px;
}

@media (max-width: 960px){
  .grid{ grid-template-columns:1fr; }
}

.cardHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.output{
  white-space: pre-wrap;
  margin:0;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fbfaf8;
  padding:12px;
  min-height:380px;
  font-size:14px;
  line-height:1.5;
}

.refs{ display:flex; flex-direction:column; gap:10px; }
.refItem{
  border:1px solid var(--line);
  background:#fbfaf8;
  border-radius:12px;
  padding:10px;
}

.refTop{ display:flex; gap:10px; align-items:center; }
.refTitle{ font-weight:600; }
.refMeta{ display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin-top:6px; }

.pill{
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#f3ead8;
  color:var(--accent);
  font-size:12px;
}

.muted{ opacity:.8; }

.referencesCard{
  margin-top:18px;
  padding:18px;
}

.referencesSummary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-weight:600;
  font-size:14px;
}

.referencesSummary::-webkit-details-marker{
  display:none;
}

.referencesSummary::after{
  content: "+";
  font-size:18px;
  color:var(--muted);
}

.referencesCard[open] .referencesSummary::after{
  content: "-";
}

.referencesBody{
  margin-top:14px;
}
