/* Plugu Clients — design tokens reused from jra-projeto briefing form */
:root {
  --bg: #fafaf8;
  --surface: #ffffff;
  --ink: #111814;
  --soft: #52606d;
  --faint: #8a948f;
  --line: #e5e3dc;
  --teal: #0f766e;
  --teal-ink: #0b5d57;
  --teal-soft: #e9f3f1;
  --field-bg: #ffffff;
  --field-border: #d8d6cf;
  --error: #b3261e;
  --error-soft: #fdeceb;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151816;
    --surface: #1d211f;
    --ink: #eef1ef;
    --soft: #a8b2ad;
    --faint: #78827d;
    --line: #2c322f;
    --teal: #3ba99f;
    --teal-ink: #5cc2b8;
    --teal-soft: #1d2f2c;
    --field-bg: #232826;
    --field-border: #3a413d;
    --error: #f2b8b5;
    --error-soft: #3a2523;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700; font-size: 19px; letter-spacing: -.02em;
  color: var(--ink);
}

h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(24px, 5vw, 32px); font-weight: 600;
  letter-spacing: -.02em; line-height: 1.1; margin: 18px 0 10px;
}
.lede { color: var(--soft); max-width: 56ch; margin: 0 0 8px; }

/* Top bar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 16px;
}
.nav { display: flex; align-items: center; gap: 18px; flex: 1; }
.nav a, .nav-placeholder {
  font-size: 14.5px; font-weight: 600; color: var(--soft);
  text-decoration: none;
}
.nav a:hover { color: var(--teal-ink); }
.nav-placeholder { color: var(--faint); cursor: default; }

.logout-form { margin: 0; }
.btn-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--soft);
}
.btn-link:hover { color: var(--error); }

/* Login card */
.login-card {
  max-width: 360px; margin: 64px auto 0; padding: 32px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 14px;
}
.login-form .field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }

input[type=text], input[type=password], select, textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--field-border); border-radius: 8px;
  background: var(--field-bg); color: var(--ink);
  font: inherit; font-size: 15.5px;
}
textarea { min-height: 100px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }

.error-msg { color: var(--error); font-size: 13px; margin: 0 0 12px; }

.btn {
  border: none; border-radius: 999px; padding: 12px 22px;
  font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--teal); color: #fff; width: 100%; }
.btn-primary:active { background: var(--teal-ink); }
.btn-secondary { background: var(--teal-soft); color: var(--teal-ink); }
.btn-secondary:active { background: var(--field-border); }

.link { color: var(--teal); text-decoration: none; }
.link:hover { color: var(--teal-ink); }

/* Shared page header used by list/detail pages */
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}

/* Generic data table (proposal lists, content rows) */
.table { width: 100%; border-collapse: collapse; border: 1px solid var(--line); }
.table thead { background: var(--teal-soft); }
.table th, .table td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line);
}
.table .actions-col { text-align: center; }

/* Status badges */
.status-badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 600; text-transform: capitalize;
}
.status-draft { background: var(--field-border); color: var(--soft); }
.status-sent { background: var(--teal-soft); color: var(--teal-ink); }
.status-approved { background: var(--teal); color: #fff; }
.status-published { background: var(--teal); color: #fff; }
.status-closed { background: var(--field-border); color: var(--soft); }

.status-form { display: inline-block; margin: 0 8px 8px 0; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; margin: 20px 0; }

/* Proposal content editor */
.fieldset {
  border: 1px solid var(--line); border-radius: 10px;
  padding: 20px; margin-bottom: 20px;
}
.fieldset legend { font-weight: 600; font-size: 15px; padding: 0 6px; }
.fieldset .field { margin-bottom: 16px; }
.fieldset .field:last-child { margin-bottom: 0; }
.hint { color: var(--soft); font-size: 13px; margin: 4px 0 0; }

/* Read-only proposal sections */
.detail-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.detail-section h2 { font-size: 18px; margin: 0 0 12px; }

/* Read-only briefing form preview */
.briefing-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.briefing-section h2 { font-size: 18px; margin: 0 0 12px; }
.briefing-question { margin-bottom: 18px; }
.briefing-question label { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.briefing-options { list-style: none; margin: 6px 0 0; padding: 0; }
.briefing-options li { margin-bottom: 6px; }
.briefing-options label { display: inline; font-weight: 400; }

/* Briefing submissions (staff side) */
.submission-list { list-style: none; margin: 0; padding: 0; }
.submission-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.submission-list li:last-child { border-bottom: 0; }
.answer-row { margin-bottom: 18px; }
.answer-label { font-weight: 600; font-size: 14.5px; margin-bottom: 4px; }
.answer-value { color: var(--soft); }
.answer-empty { color: var(--faint); }
.answer-list { margin: 0; padding-left: 20px; color: var(--soft); }
