/* =====================================================================
   Panel Member Expenses Claim Applet — theme
   Carried across verbatim from the Advance Information applet so the two
   tools look identical: Open Sans for UI, Shadows Into Light Two for the
   brand wordmark, the #1B9413 / #4D8D3F green system on warm off-white,
   12px cards, 8px inputs/buttons, 44px touch targets.
   ===================================================================== */

:root {
  --primary: #1B9413;
  --primary-dark: #157A0F;
  --secondary: #4D8D3F;
  --bg: #F5F5F3;
  --card: #FFFFFF;
  --text: #2C2A26;
  --text-secondary: #4A4A4A;
  --border: #E0E0E0;
  --error: #D32F2F;
  --warning: #F57C00;
  --info: #1976D2;
  --success: #388E3C;
  --shadow: rgba(0, 0, 0, 0.08);
  --panel: #F7F7F5;
  --radius-card: 12px;
  --radius-control: 8px;
  --maxw: 600px;
  --font: "Open Sans", Arial, sans-serif;
  --font-brand: "Shadows Into Light Two", "Open Sans", cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 18px calc(56px + env(safe-area-inset-bottom));
}

/* --- Masthead ----------------------------------------------------------- */
.masthead { text-align: center; padding: 6px 0 22px; }
.masthead img.logo { width: 96px; height: auto; display: inline-block; border-radius: 12px; }
.masthead .wordmark {
  margin: 6px 0 0;
  font-family: var(--font-brand);
  font-size: 30px;
  line-height: 1.1;
  color: var(--secondary);
  font-weight: 400;
}
.masthead .wordmark .tm { font-family: var(--font); font-size: 0.35em; vertical-align: super; }

/* --- Headings ----------------------------------------------------------- */
h1.page-title {
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text);
  font-weight: 700;
  margin: 14px 0 2px;
  text-align: center;
}
.subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0 0 22px;
}

/* --- Cards -------------------------------------------------------------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin: 0 0 12px;
  box-shadow: 0 1px 4px var(--shadow);
}
.card h2 {
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0 0 12px;
  font-weight: 700;
}

/* Session confirmation rows */
.detail-row { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--border); }
.detail-row:first-of-type { border-top: 0; }
.detail-row .label { flex: 0 0 130px; color: var(--text-secondary); font-size: 0.875rem; }
.detail-row .value { flex: 1; color: var(--text); font-size: 0.95rem; }

/* --- Form --------------------------------------------------------------- */
label.field-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 6px;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-control);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--card);
  min-height: 44px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-color: var(--primary);
}
textarea { min-height: 84px; resize: vertical; }
.field { margin: 0 0 16px; }
.hint { font-size: 0.75rem; color: var(--text-secondary); margin-top: 6px; }

/* Paired fields on one row (collapses on mobile) */
.row2 { display: flex; gap: 12px; }
.row2 > .field { flex: 1; }
@media (max-width: 480px) { .row2 { flex-direction: column; gap: 0; } }

/* Amount input with a leading currency symbol */
.amount-wrap { position: relative; }
.amount-wrap .cur { position: absolute; left: 14px; top: 12px; color: var(--text-secondary); font-size: 1rem; }
.amount-wrap input { padding-left: 26px; font-weight: 600; }
.cap-note { font-size: 0.8rem; color: var(--text-secondary); margin-top: 6px; }

/* Declarations */
.decl-list { margin: 0 0 6px; padding-left: 18px; font-size: 0.85rem; color: var(--text); }
.decl-list li { margin: 0 0 8px; }

/* File drop / picker */
.dropzone {
  border: 1.5px dashed #c4ccbe;
  border-radius: var(--radius-control);
  padding: 24px 18px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 44px;
  transition: border-color .15s, background .15s;
}
.dropzone.drag { border-color: var(--primary); background: #eef6ec; }
.dropzone strong { color: var(--primary); }

/* Checkbox row */
.check-row { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; }
.check-row input { margin-top: 4px; width: 18px; height: 18px; flex: 0 0 auto; }
.check-row label { font-size: 0.9rem; color: var(--text); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--primary);
  color: #fff;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn:hover, .btn:focus { background: var(--primary-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* --- File progress list ------------------------------------------------- */
.file-list { list-style: none; margin: 8px 0 0; padding: 0; }
.file-item { padding: 10px 0; border-top: 1px solid var(--border); }
.file-item:first-child { border-top: 0; }
.file-item .name { font-size: 0.9rem; color: var(--text); display: flex; justify-content: space-between; gap: 10px; }
.file-item .meta { font-size: 0.75rem; color: var(--text-secondary); }
.bar { height: 6px; background: #eceee8; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.file-item.done .state { color: var(--success); }
.file-item.error .state { color: var(--error); }
.state { font-size: 0.75rem; }

/* --- Status banners ----------------------------------------------------- */
.banner { border-radius: var(--radius-control); padding: 14px 16px; font-size: 0.9rem; margin: 0 0 16px; }
.banner.error { background: #fbeeec; color: var(--error); border: 1px solid #efcdc8; }
.banner.ok { background: #eef6ec; color: var(--success); border: 1px solid #cfe6c7; }
.banner .icon { font-weight: 700; margin-right: 6px; }

/* --- Success screen ----------------------------------------------------- */
.success { text-align: center; padding: 8px 0; }
.success .tick {
  width: 56px; height: 56px; border-radius: 50%;
  background: #eef6ec; color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 12px;
}

.center { text-align: center; }
.muted { color: var(--text-secondary); }
.hidden { display: none !important; }
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--border);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 24px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

footer.legal {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.55;
}
footer.legal a { color: var(--text-secondary); }
footer.legal p { margin: 0 0 10px; }
footer.legal .footer-contact { font-size: 0.75rem; color: var(--text); }
footer.legal .footer-contact strong { color: var(--text); }
footer.legal .footer-note { color: var(--text-secondary); }
footer.legal .footer-copyright { margin-bottom: 0; font-size: 0.625rem; color: #8A8A8A; }

@media (max-width: 480px) {
  .detail-row { flex-direction: column; gap: 2px; }
  .detail-row .label { flex-basis: auto; }
  .wrap { padding: 20px 14px 48px; }
  .masthead .wordmark { font-size: 26px; }
}
