/*
 * File:     kikoworks/08_case_studies/case_j_agapay_volunteers/demo.css
 * Project:  KikoWorks (Case J, practice project)
 * Purpose:  Styles for the Agapay volunteer sign-up demo.
 * Author:   John Francis Sagadraca
 * Created:  2026-10-03 (first commit)
 * Notes:    Fictional client palette, not the KikoWorks brand.
 */
/* Agapay Volunteers demo. Fictional client palette: leaf green, sun yellow, warm cream. */
:root {
  --leaf: #2f6b3a;
  --leaf-deep: #1f4a28;
  --sun: #f0b429;
  --sun-soft: #fbe3a4;
  --cream: #fbf8f1;
  --paper: #ffffff;
  --ink: #1d2a20;
  --muted: #5a665d;
  --line: #e2ddd0;
  --warn: #9a3b12;
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.5 var(--font);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding: 14px 20px;
  background: var(--leaf);
  color: #fff;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }

.mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50% 50% 50% 6px;
  background: var(--sun);
  color: var(--leaf-deep);
  font-weight: 800;
}

.demo-flag { margin: 0; font-size: 0.8rem; opacity: 0.9; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: var(--paper);
}

h1, h2 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.35rem; }
h2 { font-size: 1.1rem; }

.hint { margin: 6px 0 12px; color: var(--muted); font-size: 0.88rem; }

.shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--cream);
  color: var(--ink);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.chip:hover { border-color: var(--leaf); }

label { display: block; margin-top: 10px; font-size: 0.86rem; font-weight: 600; }
.opt { color: var(--muted); font-weight: 400; }

input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  margin-top: 4px;
  border: 1px solid #cfc8b8;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

[aria-invalid="true"] { border-color: var(--warn); background: #fff7f2; }

.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--leaf); }

.err { min-height: 0; margin: 3px 0 0; color: var(--warn); font-size: 0.8rem; }
.err:empty { display: none; }

.submit {
  width: 100%;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: var(--leaf);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.submit:hover { background: var(--leaf-deep); }

:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

.result { margin: 12px 0 0; font-size: 0.88rem; }
.result:empty { display: none; }
.result.ok, .result.warn { border-radius: 8px; padding: 9px 11px; }
.result.ok { background: #e6f2e8; color: var(--leaf-deep); }
.result.warn { background: #fdf0e6; color: var(--warn); }

.office-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.reset {
  flex-shrink: 0;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.shifts { display: grid; gap: 8px; margin: 14px 0 16px; }

.shift {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) auto;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
}

.meter { height: 8px; overflow: hidden; border-radius: 999px; background: #ece7da; }
.bar { display: block; height: 100%; border-radius: inherit; background: var(--leaf); transition: width 0.3s ease; }
.shift.full .bar { background: var(--sun); }
.shift-count { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }

[role="tab"] {
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 8px 10px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

[role="tab"][aria-selected="true"] { border-bottom-color: var(--leaf); color: var(--ink); }

.count {
  display: inline-block;
  min-width: 20px;
  margin-left: 3px;
  border-radius: 999px;
  padding: 0 6px;
  background: var(--cream);
  font-size: 0.75rem;
  text-align: center;
}

.pane { max-height: 430px; overflow: auto; padding-top: 10px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
th, td { border-bottom: 1px solid var(--line); padding: 7px 8px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }
tr.new td { background: #fff6dc; }

.status { border-radius: 999px; padding: 1px 8px; font-size: 0.75rem; font-weight: 700; }
.status.confirmed { background: #e6f2e8; color: var(--leaf-deep); }
.status.waitlisted { background: var(--sun-soft); color: #6b4a00; }

.messages, .log { margin: 0; padding: 0; list-style: none; }

.msg { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.msg p { margin: 0; }
.msg-to { color: var(--muted); font-size: 0.78rem; }
.msg-subject { margin-top: 2px !important; font-weight: 700; font-size: 0.9rem; }
.msg-body { margin: 8px 0 0; font: 0.84rem/1.5 var(--font); white-space: pre-wrap; }
.empty { color: var(--muted); font-size: 0.86rem; }

.log-row {
  display: grid;
  grid-template-columns: 64px 64px minmax(100px, 0.8fr) 64px minmax(0, 1.6fr);
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
  font-size: 0.78rem;
}

.log-time, .log-id { color: var(--muted); font-variant-numeric: tabular-nums; }
.log-result { font-weight: 700; }
.log-row.rejected .log-result, .log-row.error .log-result { color: var(--warn); }
.log-row.skipped .log-result { color: #6b4a00; }
.log-detail { overflow-wrap: anywhere; }

.foot { padding: 6px 20px 22px; color: var(--muted); font-size: 0.75rem; text-align: center; }

@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .log-row { grid-template-columns: 58px 58px minmax(0, 1fr); }
  .log-result { grid-column: 3; }
  .log-detail { grid-column: 1 / -1; }
}
