/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Customer surfaces (platform-identity): small, readable, no framework. */
body { font-family: system-ui, -apple-system, sans-serif; color: #1f2328; margin: 0; line-height: 1.5; }
main { max-width: 40rem; margin: 0 auto; padding: 1rem 1rem 3rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1rem; border-bottom: 1px solid #e5e7eb; }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.brand { font-weight: 700; text-decoration: none; color: inherit; }
a { color: #0b5cad; }
.flash { max-width: 40rem; margin: 1rem auto 0; padding: .5rem 1rem; border-radius: 6px; }
.flash-notice { background: #e8f5e9; }
.flash-alert { background: #fdecea; }
form.inline { display: inline; }
button, input[type=submit] { font: inherit; padding: .4rem .9rem; border-radius: 6px; border: 1px solid #0b5cad; background: #0b5cad; color: #fff; cursor: pointer; }
button.link { background: none; border: none; color: #0b5cad; padding: 0; text-decoration: underline; }
button.danger { background: #b42318; border-color: #b42318; }
input[type=text], select { font: inherit; padding: .35rem .5rem; border: 1px solid #c4c9d0; border-radius: 6px; }
table { border-collapse: collapse; width: 100%; }
td, th { text-align: left; padding: .4rem .5rem; border-bottom: 1px solid #eef0f2; vertical-align: middle; }
.muted { color: #656d76; }
.link-box { display: flex; gap: .5rem; } .link-box input { flex: 1; }

/* Records pages (present-hermes-records): cards, badges, labelled values. */
.record-card { border: 1px solid #e5e7eb; border-radius: 8px; padding: .75rem 1rem; margin: .75rem 0; }
.record-card header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.record-card h2 { font-size: 1.05rem; margin: 0; }
.record-card p { margin: .25rem 0; }
.badge { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .8rem; border: 1px solid currentColor; }
.badge--mapped { color: #137333; background: #e8f5e9; }
.badge--pending { color: #8a5a00; background: #fff4d6; }
.badge--no_match { color: #444; background: #eef0f2; }
.badge--rejected, .badge--failed { color: #b42318; background: #fdecea; }
dl.headline { display: grid; grid-template-columns: max-content 1fr; gap: .15rem 1rem; margin: .5rem 0 0; }
dl.headline dt, dl.value-map dt { color: #656d76; }
dl.headline dd, dl.value-map dd { margin: 0; overflow-wrap: anywhere; }
dl.value-map { display: grid; grid-template-columns: max-content 1fr; gap: .1rem .75rem; margin: 0; }
ul.value-list { margin: 0; padding-left: 1.1rem; }
table.fields th { width: 35%; font-weight: 600; }
.unclassified table.fields th { font-weight: 400; color: #656d76; }
details.sent { margin-top: 1.5rem; }
details.sent summary { cursor: pointer; font-weight: 600; }
details.sent pre { background: #f6f8fa; padding: .75rem; border-radius: 6px; overflow-x: auto; }
@media (max-width: 30rem) { dl.headline, dl.value-map { grid-template-columns: 1fr; } }
ul.value-list > li { margin-bottom: .4rem; }
.record-card p.summary { font-size: 1.1rem; font-weight: 600; margin: .35rem 0 .1rem; }

/* Connector setup walkthrough (household-connectors): numbered steps with a state, and the provider's code. */
ol.steps { list-style: none; padding: 0; margin: 1rem 0; }
li.step { border: 1px solid #e5e7eb; border-radius: 8px; padding: .6rem 1rem; margin: .6rem 0; }
li.step--action { border-color: #0b5cad; background: #f3f8fd; }
li.step--done { color: #444; background: #fafbfc; }
.step-head { margin: .1rem 0 .3rem; display: flex; gap: .6rem; align-items: baseline; }
.badge--step-todo { color: #444; background: #eef0f2; }
.badge--step-waiting { color: #8a5a00; background: #fff4d6; }
.badge--step-action { color: #0b5cad; background: #e6f0fb; }
.badge--step-done { color: #137333; background: #e8f5e9; }
ol.sub { margin: .3rem 0 .3rem 1.2rem; padding: 0; }
ol.sub li { margin: .25rem 0; }
input.otp { font-size: 1.6rem; letter-spacing: .15em; font-weight: 700; text-align: center; max-width: 16rem; }

/* Records table (records-table-view): wider than the cards, scrolls sideways on a phone. */
main.wide { max-width: 72rem; }
.pick { display: flex; flex-wrap: wrap; gap: .25rem 1rem; align-items: baseline; margin: .5rem 0; }
.pick__on { font-weight: 700; }
.table-filters { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-start; margin: .5rem 0; }
.table-filters fieldset { border: 1px solid #e5e7eb; border-radius: 6px; padding: .25rem .6rem .5rem; min-width: 9rem; }
.table-filters label { display: block; font-size: .9rem; }
.table-filters input[type=number], .table-filters input[type=date], .table-filters input[type=text] { width: 100%; box-sizing: border-box; }
.table-filters > p { flex-basis: 100%; margin: 0; }
.table-wrap { overflow-x: auto; }
.records-table { font-size: .9rem; }
.records-table th { white-space: nowrap; background: #f6f8fa; position: sticky; top: 0; }
.records-table td { max-width: 20rem; overflow-wrap: anywhere; }
.quick-filter { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: .5rem 0; }
@media (max-width: 40rem) { .records-table { font-size: .85rem; } .table-filters fieldset { flex: 1 1 100%; } }
.table-filters-box { margin: .5rem 0; }
.table-filters-box > summary { cursor: pointer; font-weight: 600; }
