/* ============================================
   SRON Expo CRM - Public Styles (v3)
   Brand color from LOGO: #800020
   ============================================ */

:root {
  --brand: #800020;
  --brand-dark: #66001a;
  --brand-deep: #2e000c;
  --brand-soft: rgba(128, 0, 32, 0.08);
  --ink: #2b2b2b;
  --muted: #8a7a7a;
  --line: #e8e2e2;
  --line-soft: #f0eaea;
  --bg: #f7f5f5;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
}

.public-shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 20px 32px;
}

/* ---------- Brand header ---------- */
.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--brand);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  height: 44px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
}

.secure-label {
  flex-shrink: 0;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
}

/* ---------- Language switch ---------- */
.lang-switch {
  margin-bottom: 22px;
  text-align: right;
  font-size: 13px;
}

.lang-switch a {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.15s;
}

.lang-switch a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.lang-switch a.active {
  color: var(--white);
  background: var(--brand);
  font-weight: 600;
}

.lang-switch span {
  color: var(--line);
  margin: 0 2px;
}

/* ---------- Intro ---------- */
.form-intro { margin-bottom: 26px; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.form-intro h1,
.success-card h1,
.login-card h1 {
  margin: 0 0 12px;
  color: var(--brand-deep);
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.5px;
  font-weight: 800;
}

.form-intro > p:last-child,
.login-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* ---------- Cards ---------- */
.lead-form,
.success-card,
.login-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 6px 24px rgba(46, 0, 12, 0.05);
}

.login-card { margin-top: 40px; }

.login-card h1 { font-size: 26px; }

.login-card .lead-form {
  padding: 20px 0 0;
  border: 0;
  box-shadow: none;
}

.login-card .brand-header {
  justify-content: center;
  border-bottom: none;
  margin-bottom: 16px;
  padding-bottom: 0;
}

.login-card .brand img { height: 52px; }

/* ---------- Form fields ---------- */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}

.field { display: block; }

.field > span,
.field-grid > label > span {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.field > span em,
.field-grid > label > span em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.field input::placeholder,
.field textarea::placeholder { color: #b8a9a9; }

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

.field-full { grid-column: 1 / -1; }

.required-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Checkbox / consent ---------- */
.check-field,
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  grid-column: 1 / -1;
  cursor: pointer;
  margin-top: 4px;
}

.check-field input[type="checkbox"],
.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
  flex-shrink: 0;
}

.check-field span,
.consent span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Alerts ---------- */
.form-alert {
  grid-column: 1 / -1;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--brand-soft);
  border: 1px solid rgba(128, 0, 32, 0.25);
  color: var(--brand);
  font-size: 13px;
}

/* ---------- Submit button ---------- */
.primary-button {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 28px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.primary-button:hover { background: var(--brand-dark); }

.primary-button:active { transform: scale(0.99); }

.primary-button:disabled {
  background: #c4a3ad;
  cursor: not-allowed;
}

/* ---------- Success card ---------- */
.success-card {
  text-align: center;
  padding: 44px 28px;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--brand-soft);
  display: grid;
  place-items: center;
  font-size: 30px;
  color: var(--brand);
}

.success-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 8px;
}

.success-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

/* ---------- Honeypot ---------- */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ---------- File Picker ---------- */
.file-picker { margin-top: 4px; }
.file-picker-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  border: 1.5px dashed var(--brand);
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.file-picker-add:hover { background: rgba(128, 0, 32, 0.14); }
.file-picker-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.file-picker-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.file-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.file-picker-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 500;
}
.file-picker-item small { color: var(--muted); }
.file-picker-remove {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(128, 0, 32, 0.12);
  color: var(--brand);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.file-picker-remove:hover { background: var(--brand); color: var(--white); }

/* ---------- Footer ---------- */
.public-footer {
  margin-top: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .public-shell { padding: 16px 14px 28px; }

  .brand-header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .brand { justify-content: center; }

  .brand img { height: 38px; max-width: 100%; }

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

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

  .lead-form,
  .success-card,
  .login-card {
    padding: 20px 16px;
    border-radius: 12px;
  }
}
