:root {
  --green: #2F5D4A;
  --green-ink: #1F3F33;
  --gold: #7FA38E;
  --sage: #D3E3D0;
  --sage-mid: #9DB5A5;
  --mist: #DDE6E8;
  --bg: #F5F6F2;
  --card: #FFFFFF;
  --line: #D5DFD8;
  --text: #17211D;
  --muted: #55625C;
  --danger: #8C1D18;
  --danger-bg: #FDF0EE;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 12px 34px rgba(16, 40, 32, .10), 0 2px 6px rgba(16, 40, 32, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: var(--text); background: var(--bg) url("../images/bg.png") center / cover no-repeat fixed; line-height: 1.5; }
a { color: #0E5B45; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; color: var(--green-ink); margin: 0 0 8px; }
.muted { color: var(--muted); }
.timeline-comment { white-space: pre-line; overflow-wrap: anywhere; }
.small { font-size: 13px; }
.center { text-align: center; }

/* Header */
.topbar { background: var(--card); border-bottom: 1px solid #E3E8E4; box-shadow: 0 1px 12px rgba(16, 40, 32, .05); }
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand strong { font-size: 17px; font-weight: 800; display: block; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.brand-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--green); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 14px rgba(14, 77, 58, .3); flex: none; }
.topnav { flex: 1 1 400px; display: flex; flex-wrap: wrap; gap: 4px; }
.topnav a { padding: 10px 14px; border-radius: 12px; color: #3B4842; text-decoration: none; font-weight: 600; font-size: 14px; }
.topnav a:hover { background: var(--mist); }
.usermenu { display: flex; align-items: center; gap: 10px; margin: 0; }
.avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--sage); color: var(--green-ink); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.username { font-size: 14px; color: #3B4842; }
.link-button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: #0E5B45; cursor: pointer; padding: 8px; border-radius: 10px; min-height: 44px; }
.link-button:hover { background: var(--mist); }

.page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 64px; }
.page-card { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px; max-width: 720px; }

/* Buttons and fields: rounded, soft shadow, focus glow */
.btn-primary-soft { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 24px; border: 0; border-radius: var(--radius); background: var(--green); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; box-shadow: 0 6px 14px rgba(14, 77, 58, .22); transition: box-shadow .15s ease, transform .15s ease; }
.btn-primary-soft:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(14, 77, 58, .3); color: #fff; }
.btn-primary-soft:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-primary-soft.inline { margin-top: 12px; }
.btn-secondary { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 24px; border: 2px solid var(--green); border-radius: var(--radius); background: #fff; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: background .15s ease, transform .15s ease; }
.btn-secondary:hover { background: var(--sage); color: var(--green-ink); transform: translateY(-1px); }
.btn-secondary:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.field { min-height: 52px; padding: 0 16px; display: flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(16, 40, 32, .05); transition: box-shadow .2s ease, border-color .2s ease; }
.field:focus-within { border-color: var(--green); box-shadow: 0 0 0 5px rgba(14, 77, 58, .12), 0 8px 20px rgba(16, 40, 32, .08); }
.field input, .field select, .field textarea { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); outline: none; }
.field select { height: 49px; cursor: pointer; -webkit-appearance: none; appearance: none; padding-right: 28px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232F5D4A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 2px center / 14px no-repeat; }
.field textarea { resize: vertical; min-height: 84px; padding: 0; line-height: 1.5; }
.field:has(textarea) { align-items: flex-start; padding: 14px 16px; }
.field-error { display: block; color: var(--danger); font-size: 13px; margin-top: 4px; min-height: 0; }
.alert-soft { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius); padding: 12px 16px; font-size: 14px; margin-bottom: 8px; }
.alert-soft ul { margin: 0; padding-left: 18px; }

/* Login */
.login-body { min-height: 100vh; }
.login-wrap { max-width: 440px; margin: 0 auto; padding: 56px 20px 32px; display: flex; flex-direction: column; gap: 24px; }
.login-card { background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 32px; display: flex; flex-direction: column; gap: 6px; }
.login-card label { font-size: 14px; font-weight: 700; margin-top: 12px; }
.login-card .btn-primary-soft { margin-top: 20px; width: 100%; }

@media (max-width: 600px) {
  .topbar-inner { padding: 10px 16px; }
  .page { padding: 24px 16px 48px; }
  .username { display: none; }
}

/* Dropdown list: breathing room around each option */
.field select option { padding: 9px 16px; background: #fff; color: var(--text); font-size: 15px; }
.field select option:checked { background: var(--sage); color: var(--green-ink); }

/* Chrome/Edge 135+: a stylable dropdown list, so options get real padding. Other browsers keep the native list. */
@supports (appearance: base-select) {
  .field select, .field select::picker(select) { appearance: base-select; }
  .field select { display: flex; align-items: center; padding-block: 0; line-height: 1.2; }
  .field select selectedcontent { display: flex; align-items: center; flex: 1; min-width: 0; padding: 0; }
  .field select::picker-icon { display: none; }
  .field select::picker(select) { margin-top: 6px; padding: 6px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .field select option { display: flex; align-items: center; padding: 10px 16px; border-radius: 10px; cursor: pointer; }
  .field select option::checkmark { display: none; }
  .field select option:hover, .field select option:focus-visible { background: var(--mist); }
  .field select option:checked { background: var(--sage); color: var(--green-ink); font-weight: 600; }
}
