:root {
  --ink: #182c28;
  --ink-soft: #344c46;
  --cream: #f5f0e6;
  --paper: #fffdf8;
  --line: #d9d6ca;
  --orange: #f36f3f;
  --orange-dark: #ca4825;
  --gold: #e6b55d;
  --green: #2b6b5d;
  --sage: #bcd0c3;
  --muted: #697771;
  --danger-bg: #fff0eb;
  --shadow: 0 18px 60px rgba(24, 44, 40, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; color: #fff; background: var(--orange); border-radius: 50% 50% 46% 54%; font-family: Georgia, serif; font-size: 14px; font-weight: 800; transform: rotate(-3deg); }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 0 22px; font-weight: 800; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(243,111,63,.38); outline-offset: 3px; }
.button-small { min-height: 42px; padding: 0 18px; font-size: 14px; }
.button-primary { background: var(--orange); color: #fff; }
.button-primary:hover { background: var(--orange-dark); }
.button-secondary { border-color: rgba(255,255,255,.35); color: #fff; }
.button-secondary:hover { background: rgba(255,255,255,.08); }
.button-light { background: #fff; color: var(--ink); }
.button-outline-light { border-color: rgba(255,255,255,.42); color: #fff; }
.eyebrow, .section-kicker { display: inline-block; color: var(--orange); font-size: 12px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

.hero-shell { background: var(--ink); color: #fff; padding: 0 clamp(20px, 5vw, 76px); }
.public-nav { min-height: 84px; max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 32px; border-bottom: 1px solid rgba(255,255,255,.16); }
.nav-links { margin-left: auto; display: flex; gap: 28px; color: rgba(255,255,255,.72); font-size: 14px; }
.nav-links a:hover { color: #fff; }
.hero { min-height: 560px; max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); align-items: center; gap: clamp(40px, 7vw, 110px); padding: 72px 0 78px; }
.hero h1 { max-width: 820px; margin: 18px 0 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(52px, 7vw, 94px); line-height: .96; letter-spacing: -.055em; font-weight: 600; }
.hero-copy > p { max-width: 690px; color: rgba(255,255,255,.72); font-size: 19px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { align-self: end; margin-bottom: 28px; display: flex; gap: 20px; border-top: 1px solid rgba(255,255,255,.25); padding-top: 24px; }
.note-number { color: var(--gold); font-family: Georgia, serif; font-size: 30px; }
.hero-note strong { font-size: 15px; }
.hero-note p { margin: 8px 0 0; color: rgba(255,255,255,.62); line-height: 1.55; font-size: 14px; }
.summary-strip { max-width: 1240px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.16); display: grid; grid-template-columns: repeat(3, 1fr); }
.summary-strip > div { padding: 30px 0 34px; display: flex; align-items: baseline; gap: 13px; border-right: 1px solid rgba(255,255,255,.13); }
.summary-strip > div + div { padding-left: 34px; }
.summary-strip strong { color: var(--gold); font-family: Georgia, serif; font-size: 34px; }
.summary-strip span { color: rgba(255,255,255,.64); font-size: 14px; }

.section { padding: 104px clamp(20px, 5vw, 76px); }
.section > * { max-width: 1240px; margin-left: auto; margin-right: auto; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 36px; margin-bottom: 44px; }
.section-heading h2, .contact-section h2 { margin: 10px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(38px, 5vw, 62px); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.section-heading > p { max-width: 430px; margin: 0; color: var(--muted); line-height: 1.6; }
.needs-section { background: var(--cream); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-row button { border: 1px solid var(--line); background: transparent; padding: 9px 15px; border-radius: 999px; cursor: pointer; color: var(--ink-soft); }
.filter-row button.filter-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.needs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.need-card { background: var(--paper); border: 1px solid rgba(24,44,40,.1); padding: 17px; min-height: 215px; display: flex; flex-direction: column; box-shadow: 0 8px 30px rgba(24,44,40,.035); }
.need-card-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.priority-pill { display: inline-flex; width: max-content; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.priority-urgente { background: #fee2d8; color: #a93519; }
.priority-alta { background: #fff0ca; color: #8a5a00; }
.priority-normal { background: #dfece4; color: #265a4e; }
.category-label { color: var(--muted); font-size: 12px; }
.need-card h3 { margin: 14px 0 5px; font-family: Georgia, serif; font-size: 20px; line-height: 1.12; }
.need-notes { color: var(--muted); margin: 0; font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.need-quantity { display: flex; align-items: baseline; gap: 7px; margin: auto 0 10px; padding-top: 14px; }
.need-quantity strong { font-family: Georgia, serif; font-size: 30px; color: var(--orange-dark); }
.need-quantity span { color: var(--muted); font-size: 12px; }
.progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.progress-track { height: 5px; background: #e4e2d8; border-radius: 99px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
.empty-state { border: 1px dashed #a7b9ac; padding: 40px; color: var(--muted); text-align: center; }
.empty-state h3 { color: var(--ink); font-family: Georgia, serif; font-size: 28px; margin: 0 0 8px; }

.info-section { background: var(--paper); }
.large-info-card { max-width: 1000px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.info-card-label { background: var(--green); color: #fff; padding: 14px 24px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.formatted-text { padding: clamp(28px, 5vw, 52px); white-space: normal; color: var(--ink-soft); line-height: 1.75; font-size: 16px; }
.clothing-card .formatted-text { columns: 2; column-gap: 60px; }

.donations-section { background: #e8efe9; }
.donation-list { border-top: 1px solid #bfcfc5; }
.donation-list article { display: grid; grid-template-columns: 48px 1fr auto; gap: 20px; align-items: center; border-bottom: 1px solid #bfcfc5; padding: 22px 0; }
.donation-check { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 900; }
.donation-list h3 { margin: 0 0 3px; font-size: 17px; }
.donation-list p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.donation-list strong { color: var(--green); }

.contact-section { background: var(--ink); color: #fff; padding: 90px clamp(20px, 5vw, 76px); display: grid; grid-template-columns: .75fr 1.25fr; gap: clamp(35px, 7vw, 90px); align-items: start; }
.contact-intro > p { max-width: 470px; color: rgba(255,255,255,.65); line-height: 1.6; }
.contact-facts { margin: 28px 0 0; }
.contact-facts div { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.contact-facts dt { color: rgba(255,255,255,.5); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.contact-facts dd { margin: 5px 0 0; font-weight: 700; line-height: 1.45; }
.contact-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); }
.contact-card .formatted-text { color: rgba(255,255,255,.84); padding: 34px; }
.contact-actions { grid-column: 2; display: flex; gap: 12px; flex-wrap: wrap; }
footer { min-height: 90px; padding: 25px clamp(20px, 5vw, 76px); background: #10211e; color: rgba(255,255,255,.58); display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
footer a:hover { color: #fff; }

.setup-body, .login-page { min-height: 100vh; background: var(--ink); display: grid; place-items: center; padding: 70px 20px; }
.public-setup { display: grid; }
.setup-shell { width: min(100%, 760px); }
.setup-shell > .brand { color: #fff; margin-bottom: 24px; }
.setup-card, .login-card { background: var(--paper); padding: clamp(28px, 6vw, 54px); box-shadow: var(--shadow); }
.setup-card h1, .login-card h1 { font-family: Georgia, serif; font-size: clamp(40px, 7vw, 58px); line-height: 1; margin: 14px 0 18px; font-weight: 600; }
.setup-card p, .login-card p { color: var(--muted); line-height: 1.65; }
.setup-steps { padding-left: 22px; color: var(--ink-soft); line-height: 1.7; }
.setup-steps li + li { margin-top: 10px; }
code { background: #ebe7dc; padding: 3px 6px; border-radius: 4px; }
.setup-form, .login-form { display: grid; gap: 17px; margin-top: 28px; }
.setup-form label, .login-form label, .admin-form label { display: grid; gap: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 750; }
.setup-form input, .login-form input, .admin-form input, .admin-form textarea, .admin-form select { width: 100%; border: 1px solid var(--line); background: #fff; min-height: 47px; padding: 11px 13px; border-radius: 5px; color: var(--ink); }
.admin-form textarea { min-height: 100px; resize: vertical; line-height: 1.55; }
.setup-form .button, .login-form .button { border: 0; margin-top: 6px; }
.notice { padding: 13px 16px; margin: 16px 0; border-left: 4px solid var(--orange); background: #fff2ec; color: #94371f; line-height: 1.5; }
.notice.success { background: #e4f1e8; border-color: var(--green); color: #235448; }
.login-page { position: relative; }
.login-back { position: absolute; top: 28px; left: 30px; color: rgba(255,255,255,.65); font-size: 14px; }
.login-card { width: min(100%, 450px); }
.login-card .brand-mark { margin-bottom: 25px; }
.login-card .eyebrow { display: block; }

.admin-body { background: #f1f2ed; }
.admin-page { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; padding: 26px 18px; display: flex; flex-direction: column; }
.admin-brand { padding: 0 10px 28px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-sidebar nav { display: grid; gap: 5px; margin-top: 26px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 13px; border-radius: 7px; color: rgba(255,255,255,.66); font-size: 14px; }
.admin-sidebar nav a span { width: 22px; font-size: 18px; text-align: center; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-bottom { margin-top: auto; padding: 20px 12px 0; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 13px; }
.sidebar-bottom a, .sidebar-bottom button { border: 0; background: transparent; color: rgba(255,255,255,.62); text-align: left; padding: 0; font-size: 13px; cursor: pointer; }
.sidebar-bottom form { margin: 0; }
.admin-workspace { min-width: 0; padding: 42px clamp(24px, 4vw, 64px) 70px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 30px; }
.admin-header h1 { margin: 7px 0 0; font-family: Georgia, serif; font-size: 45px; line-height: 1; font-weight: 600; }
.admin-header .button { border: 0; }
.admin-notice { position: sticky; top: 15px; z-index: 10; background: var(--ink); color: #fff; padding: 13px 17px; margin-bottom: 20px; border-left: 4px solid var(--orange); box-shadow: var(--shadow); }
.admin-notice.error { background: #7d2d1d; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.admin-stats article, .admin-panel { background: var(--paper); border: 1px solid #dedfd8; box-shadow: 0 8px 30px rgba(24,44,40,.035); }
.admin-stats article { padding: 25px; display: grid; }
.admin-stats span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.admin-stats strong { font-family: Georgia, serif; font-size: 49px; margin: 15px 0 2px; font-weight: 600; }
.admin-stats small { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; }
.admin-panel { padding: 26px; margin-bottom: 22px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.panel-heading h2 { font-family: Georgia, serif; font-size: 28px; margin: 6px 0 0; font-weight: 600; }
.panel-heading > a, .panel-heading > span { color: var(--muted); font-size: 12px; }
.dashboard-need { display: grid; grid-template-columns: 12px 1fr auto; gap: 13px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.priority-dot { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; }
.dashboard-need div { display: grid; gap: 2px; }
.dashboard-need small { color: var(--muted); }
.dashboard-need b { font-size: 13px; }
.quick-panel { background: var(--ink); color: #fff; }
.quick-panel h2 { font-family: Georgia, serif; font-size: 30px; font-weight: 600; }
.quick-panel > a { display: flex; align-items: center; width: 100%; min-height: 48px; border: 1px solid rgba(255,255,255,.15); border-radius: 5px; background: rgba(255,255,255,.06); color: #fff; padding: 0 15px; margin-top: 8px; font-size: 14px; }
.quick-panel > a:hover { background: rgba(255,255,255,.12); }
.admin-empty { color: var(--muted); }
.big-empty { padding: 50px 20px; text-align: center; }
.big-empty h3 { color: var(--ink); font-family: Georgia, serif; font-size: 26px; margin: 0 0 8px; }
.admin-item-list > article { display: grid; grid-template-columns: minmax(0, 1fr) 150px 180px; gap: 24px; align-items: center; padding: 23px 0; border-top: 1px solid var(--line); }
.item-title-row { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.item-main h3 { margin: 10px 0 4px; font-size: 18px; }
.item-main p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.item-progress-admin { display: grid; }
.item-progress-admin strong { font-family: Georgia, serif; font-size: 33px; color: var(--orange-dark); font-weight: 600; }
.item-progress-admin span, .item-progress-admin small { color: var(--muted); font-size: 12px; }
.item-actions { display: grid; gap: 6px; }
.item-actions a, .item-actions button { display: flex; align-items: center; justify-content: center; width: 100%; border: 1px solid var(--line); background: #fff; min-height: 36px; border-radius: 4px; cursor: pointer; font-size: 12px; }
.item-actions form { margin: 0; }
.item-actions .action-primary { background: var(--green); color: #fff; border-color: var(--green); }
.item-actions .action-danger { color: #a13b26; }
.admin-form { border-left: 4px solid var(--orange); }
.donation-form { border-left-color: var(--green); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-wide { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.form-actions > a { color: var(--muted); }
.form-actions > span { margin-right: auto; color: var(--muted); font-size: 13px; }
.form-help { color: var(--muted); font-size: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 12px; border-top: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.textarea-feature { padding: 22px; border: 1px solid var(--sage); background: #f4f8f5; }
.textarea-feature > span { font-family: Georgia, serif; font-size: 22px; color: var(--ink); }
.textarea-feature > small { color: var(--muted); font-weight: 400; line-height: 1.5; }
.textarea-feature textarea { min-height: 340px; background: #fff; }

@media (max-width: 1050px) {
  .nav-links { display: none; }
  .public-nav .button { margin-left: auto; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-note { align-self: auto; max-width: 560px; }
  .needs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .admin-page { grid-template-columns: 86px 1fr; }
  .admin-sidebar { padding-left: 10px; padding-right: 10px; }
  .admin-brand span:last-child { display: none; }
  .admin-sidebar nav a { font-size: 0; justify-content: center; }
  .admin-sidebar nav a span { font-size: 18px; }
  .sidebar-bottom { padding-left: 3px; padding-right: 3px; }
  .sidebar-bottom a, .sidebar-bottom button { font-size: 11px; text-align: center; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .admin-item-list > article { grid-template-columns: minmax(0,1fr) 130px; }
  .item-actions { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .public-nav { min-height: 72px; }
  .public-nav .button { display: none; }
  .hero { padding: 55px 0; }
  .hero h1 { font-size: 51px; }
  .hero-copy > p { font-size: 17px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .summary-strip { grid-template-columns: 1fr; padding: 14px 0; }
  .summary-strip > div, .summary-strip > div + div { padding: 14px 0; border-right: 0; }
  .section { padding-top: 75px; padding-bottom: 75px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 18px; }
  .needs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clothing-card .formatted-text { columns: 1; }
  .donation-list article { grid-template-columns: 40px 1fr; }
  .donation-list article > strong { grid-column: 2; }
  .contact-section { grid-template-columns: 1fr; gap: 30px; }
  .contact-actions { grid-column: auto; flex-direction: column; }
  footer { align-items: flex-start; gap: 20px; }
  .admin-page { display: block; padding-bottom: 72px; }
  .admin-sidebar { position: fixed; z-index: 30; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 69px; padding: 8px 6px; display: block; }
  .admin-brand, .sidebar-bottom { display: none; }
  .admin-sidebar nav { margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; }
  .admin-sidebar nav a { min-height: 52px; display: grid; place-items: center; gap: 0; padding: 2px; font-size: 9px; }
  .admin-sidebar nav a span { font-size: 17px; }
  .admin-workspace { padding: 28px 16px 36px; }
  .admin-header { align-items: flex-end; }
  .admin-header h1 { font-size: 36px; }
  .admin-header .button { min-height: 42px; padding: 0 14px; font-size: 12px; }
  .admin-stats { grid-template-columns: 1fr; }
  .admin-stats article { grid-template-columns: 1fr auto; align-items: center; }
  .admin-stats article strong { grid-row: 1 / 3; grid-column: 2; }
  .admin-item-list > article, .form-grid { grid-template-columns: 1fr; }
  .item-actions { grid-column: auto; }
  .field-wide { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions > span { margin-right: 0; }
  .textarea-feature { padding: 16px; }
  .setup-card, .login-card { padding: 30px 23px; }
}

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

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
