/* Kade Ventures — Cloud Job Card App — mobile-first styles.
   Navy #0A1637, gold #D4AF37. Big touch targets for field use. */
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; background: #f4f6fb; color: #1a2340; padding-bottom: 76px; }
a { color: #0a1637; }
button { font-size: 1rem; cursor: pointer; }
input, select, textarea { font-size: 1rem; width: 100%; padding: .65rem .7rem; border: 1px solid #ccd2e0; border-radius: 8px; background: #fff; color: #1a2340; }
textarea { resize: vertical; }
label { display: block; font-size: .85rem; font-weight: 600; color: #5b6478; margin: .7rem 0 .25rem; }
label.inline { display: inline-flex; align-items: center; gap: .4rem; margin: 0; font-weight: 400; color: #1a2340; }
label.inline input { width: auto; }

#topbar { background: #0a1637; color: #fff; padding: .7rem 1rem; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: .6rem; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand b { display: block; letter-spacing: 1px; font-size: .95rem; }
.brand small { color: #d4af37; font-size: .7rem; letter-spacing: .5px; }
#userbox { text-align: right; font-size: .8rem; }
#userbox button { background: none; border: 0; color: #d4af37; font-size: .8rem; padding: .2rem 0; text-decoration: underline; }

#view { max-width: 760px; margin: 0 auto; padding: 1rem; }
h1 { font-size: 1.4rem; margin: .2rem 0 1rem; color: #0a1637; }
h2 { font-size: 1.05rem; margin: 1.4rem 0 .5rem; color: #0a1637; border-top: 3px solid #d4af37; padding-top: .5rem; }
.card { background: #fff; border-radius: 12px; padding: 1rem; box-shadow: 0 2px 10px rgba(10,22,55,.07); margin-bottom: 1rem; }
.muted { color: #5b6478; font-size: .9rem; }
.warn { background: #fff8e1; border: 1px solid #d4af37; border-radius: 8px; padding: .8rem 1rem; font-size: .9rem; }
.err { color: #c0392b; font-size: .9rem; }

.btn { background: #0a1637; color: #fff; border: 0; border-radius: 8px; padding: .75rem 1.2rem; font-weight: 600; }
.btn.gold { background: #d4af37; color: #0a1637; }
.btn.green { background: #0a7a3d; }
.btn.ghost { background: #eef1f7; color: #0a1637; }
.btn.danger { background: #c0392b; }
.btn.small { padding: .45rem .8rem; font-size: .85rem; }
.btnrow { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }
.btnrow .btn { flex: 1; min-width: 120px; text-align: center; }

#bottomnav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid #e2e6f1; display: flex; z-index: 10; }
#bottomnav button { flex: 1; background: none; border: 0; padding: .6rem .2rem .5rem; color: #5b6478; font-size: 1.15rem; }
#bottomnav button span { display: block; font-size: .7rem; margin-top: 1px; }
#bottomnav button.active { color: #0a1637; font-weight: 700; }
#bottomnav button.active span { color: #9c7c1e; }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.stat { background: #fff; border-radius: 12px; padding: 1rem; box-shadow: 0 2px 10px rgba(10,22,55,.07); }
.stat b { display: block; font-size: 1.6rem; color: #0a1637; }
.stat span { font-size: .8rem; color: #5b6478; }

.jobrow { display: block; text-decoration: none; color: inherit; background: #fff; border-radius: 12px; padding: .9rem 1rem; margin-bottom: .7rem; box-shadow: 0 2px 8px rgba(10,22,55,.06); border-left: 4px solid #d4af37; }
.jobrow.urgent { border-left-color: #c0392b; }
.jobrow b { color: #0a1637; }
.jobrow .meta { font-size: .85rem; color: #5b6478; margin-top: .2rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; background: #eef1f7; color: #0a1637; }
.pill.urgent { background: #fdecea; color: #c0392b; }
.pill.done { background: #e6f4ea; color: #0a7a3d; }
.pill.closed { background: #e2e6f1; color: #5b6478; }

.filters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters button { border: 1px solid #ccd2e0; background: #fff; border-radius: 999px; padding: .45rem .9rem; font-size: .85rem; }
.filters button.active { background: #0a1637; color: #fff; border-color: #0a1637; }
.searchrow { display: flex; gap: .5rem; margin-bottom: 1rem; }
.searchrow input { flex: 1; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }

table.rows { width: 100%; border-collapse: collapse; }
table.rows th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: #5b6478; padding: .4rem .3rem; }
table.rows td { padding: .4rem .3rem; border-top: 1px solid #eef1f7; vertical-align: top; }
table.rows input { padding: .5rem; }
table.rows .narrow { width: 74px; }
table.rows .money { width: 96px; }
.rowline { display: flex; gap: .5rem; align-items: center; }
.rowline input[type="text"] { flex: 1; }
.totals { text-align: right; font-size: 1rem; margin-top: .5rem; }
.totals b { color: #0a1637; }

.sigbox { border: 1.5px dashed #9c7c1e; border-radius: 8px; background: #fff; touch-action: none; width: 100%; height: 150px; display: block; }
.sigwrap { margin-bottom: .5rem; }

.photogrid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.photogrid img { width: 100%; border-radius: 8px; display: block; }
.photogrid figure { margin: 0; }
.photogrid figcaption { font-size: .8rem; color: #5b6478; margin-top: .25rem; }

#toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: #0a1637; color: #fff; padding: .7rem 1.2rem; border-radius: 999px; font-size: .9rem; display: none; z-index: 50; max-width: 92vw; text-align: center; }
#toast.show { display: block; }
#toast.bad { background: #c0392b; }

.loginwrap { max-width: 420px; margin: 3rem auto 0; }
.loginwrap .logo { text-align: center; margin-bottom: 1rem; }
.loginwrap .logo svg { width: 72px; height: 72px; }
.loginwrap h1 { text-align: center; }

/* Technician self-registration (002): link under the login button, and
   the "Awaiting approval" pill on the Team screen. */
.loginwrap .reglink { text-align: center; margin-top: 1rem; }
.pill.pending { background: #fef3c7; color: #92400e; }
