/* assets/styles.css — CRG polished theme (final) */

:root{
  --gold: #9A690F;
  --gold-dark: #845F0F;
  --cream: #FFF7F0;
  --paper: #FFFFFF;

  --ink: #0B0E14;
  --muted: rgba(11,14,20,.55);

  --border: rgba(11,14,20,.14);
  --border-strong: rgba(11,14,20,.20);

  --shadow: 0 18px 42px rgba(11,14,20,.10);
  --shadow-soft: 0 10px 26px rgba(11,14,20,.07);

  --radius-card: 26px;
  --radius-field: 18px;
  --radius-pill: 25px;

  --bw: 2px;

  --body-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --heading-font: "Times New Roman", Times, serif;
}

/* reset */
*{ margin:0; padding:0; box-sizing:border-box; }

body{
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);

  background:
    radial-gradient(900px 700px at 15% -10%, rgba(154,105,15,.10), transparent 55%),
    radial-gradient(900px 700px at 110% 10%, rgba(154,105,15,.08), transparent 55%),
    var(--cream);

  padding: 28px 16px;
}

.container{
  max-width: 980px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid rgba(11,14,20,.16);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 36px 36px 30px 36px;
}

/* HERO */
.hero{
  text-align: center;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 2px solid rgba(154,105,15,.28);
}

.hero-title{
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 35px;
  line-height: 1.05;
  letter-spacing: .2px;
  color: rgba(11,14,20,.88);
}

.hero-subtitle{
  margin-top: 14px;
  font-size: 18px;              /* bigger + centred */
  font-weight: 300;
  color: rgba(11,14,20,.62);
  letter-spacing: .2px;
}

/* labels / fields */
form{ display:flex; flex-direction:column; }

label{
  display:block;
  margin-top: 16px;
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: .2px;
  color: rgba(11,14,20,.86);
}

.panel-muted{
  font-weight: 300;
  color: var(--muted);
}

/* inputs */
input[type="text"],
textarea,
select{
  width: 100%;
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-field);
  background: #fff;
  color: var(--ink);
  padding: 12px 16px;
  font-family: var(--body-font);
  font-weight: 300;
  font-size: 16px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

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

select{
  appearance:none;
  cursor:pointer;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(11,14,20,.55) 50%),
    linear-gradient(135deg, rgba(11,14,20,.55) 50%, transparent 50%);
  background-position:
    calc(100% - 22px) calc(1em + 2px),
    calc(100% - 16px) calc(1em + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat:no-repeat;
}

input[type="text"]:hover,
textarea:hover,
select:hover{ border-color: var(--border-strong); }

input[type="text"]:focus,
textarea:focus,
select:focus{
  border-color: rgba(154,105,15,.55);
  box-shadow: 0 0 0 4px rgba(154,105,15,.14);
}

/* help text */
.help-text{
  color: rgba(154,105,15,.88);
  font-size: 13px;
  margin-top: -6px;
  margin-bottom: 10px;
}

/* file upload */
input[type="file"]{
  width: 100%;
  border: var(--bw) dashed rgba(11,14,20,.18);
  border-radius: var(--radius-field);
  background: rgba(255,255,255,.95);
  padding: 12px 14px;
  font-family: var(--body-font);
  font-weight: 300;
  color: rgba(11,14,20,.75);
  transition: border-color .15s ease, box-shadow .15s ease;
}

input[type="file"]:hover{ border-color: rgba(154,105,15,.40); }

input[type="file"]:focus{
  border-color: rgba(154,105,15,.55);
  box-shadow: 0 0 0 4px rgba(154,105,15,.14);
}

input[type="file"]::file-selector-button{
  border: 0;
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  margin-right: 12px;
  cursor:pointer;
  background: rgba(154,105,15,.14);
  color: rgba(11,14,20,.86);
  font-weight: 500;
}

/* panels */
.panel{
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(11,14,20,.14);
  background: rgba(255,255,255,.70);
  box-shadow: var(--shadow-soft);
}

.panel-head{
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(11,14,20,.10);
}

.panel-title{
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 18px;
  color: rgba(11,14,20,.88);
}

/* coauthor entry */
.coauthor-entry{
  display:grid;
  grid-template-columns: 1fr 1fr 1.3fr auto;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(11,14,20,.14);
  border-radius: var(--radius-card);
  background: rgba(255,255,255,.92);
}

/* Equity section — more separated */
.equity-section{
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(154,105,15,.26);
  background: linear-gradient(180deg, rgba(154,105,15,.09), rgba(255,255,255,.92));
  box-shadow: var(--shadow-soft);
}

.equity-header{
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(11,14,20,.10);
  margin-bottom: 12px;
}

.equity-title{
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: 18px;
  color: rgba(11,14,20,.90);
}

.equity-subtitle{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(11,14,20,.60);
}

/* Buttons */
.btn{
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 16px;
  cursor:pointer;
  transition: opacity .15s ease, transform .06s ease, box-shadow .15s ease;
  line-height: 1;
  border: 0;
}

.btn:active{ transform: translateY(1px); }

.btn-primary{
  margin-top: 18px;
  background: var(--gold);
  color:#fff;
  text-transform: uppercase;
  letter-spacing: .6px;
  box-shadow: 0 12px 20px rgba(154,105,15,.18);
}

.btn-primary:hover{ opacity:.96; }

.btn-secondary{
  background: rgba(154,105,15,.10);
  color: rgba(11,14,20,.86);
  border: var(--bw) solid rgba(154,105,15,.18);
  padding: 12px 18px; /* slightly smaller than primary */
  font-weight: 600;
}

.btn-secondary:hover{ box-shadow: 0 10px 16px rgba(11,14,20,.06); }

/* remove button styling (existing) */
.remove-coauthor{
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  border: var(--bw) solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.08);
  color: rgba(11,14,20,.86);
  font-weight: 600;
  cursor:pointer;
}

.remove-coauthor:hover{ background: rgba(239,68,68,.12); }

/* messages */
.message{
  padding: 14px 16px;
  margin-top: 16px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(11,14,20,.14);
  display:none;
  font-weight: 500;
}

.message.success{
  display:block;
  border-color: rgba(16,185,129,.35);
  background: rgba(16,185,129,.08);
}

.message.error{
  display:block;
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
}

/* loading spinner */
.loading{ position:relative; pointer-events:none; }
.loading::after{
  content:'';
  position:absolute;
  top:50%;
  right:18px;
  width:18px;
  height:18px;
  border:3px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius:50%;
  transform: translateY(-50%);
  animation: spin .8s linear infinite;
}
@keyframes spin{ to{ transform: translateY(-50%) rotate(360deg);} }

/* responsive */
@media (max-width: 768px){
  .container{ padding: 22px; }
  .hero-title{ font-size: 34px; }

  .coauthor-entry{
    grid-template-columns: 1fr;
  }

  .panel-head{
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-secondary{ width: 100%; }
}
