/* FDAS Affiliates portal - mobile-first. */
:root{ --navy:#1a2b49; --blue:#2e6be6; --ink:#1f2733; --muted:#6b7480; --line:#e4e8ee; --bg:#f4f6f9; --green:#1f9d57; --red:#d64545; --radius:12px; }
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.45}
h1{font-size:22px;margin:0 0 4px}
.muted{color:var(--muted)}
small{color:var(--muted);font-weight:400}

/* Login */
.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px}
.login-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:30px;width:100%;max-width:380px;box-shadow:0 18px 50px rgba(20,30,55,.12)}
.brand{font-size:22px;font-weight:800;color:var(--navy)}
.brand span{font-weight:400;color:var(--muted)}
.login-card .muted{margin:2px 0 18px}
.login-card label{display:block;font-size:13px;font-weight:600;margin:12px 0 5px}
.login-card input{width:100%;padding:12px;border:1px solid var(--line);border-radius:9px;font-size:16px}
.login-card button{width:100%;margin-top:20px;padding:13px;border:none;border-radius:9px;background:var(--navy);color:#fff;font-size:16px;font-weight:600;cursor:pointer}
.login-card button:disabled{opacity:.6}
.err{color:var(--red);font-size:14px;margin-top:12px;min-height:18px;text-align:center}

/* Top bar */
.topbar{position:sticky;top:0;z-index:5;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:12px 16px}
.topbar-brand{font-weight:800}.topbar-brand span{font-weight:400;opacity:.7}
.topbar-right{display:flex;align-items:center;gap:12px;font-size:14px}
.topbar-right .shop{opacity:.9}
.signout{color:#fff;text-decoration:underline;opacity:.85}

.wrap{max-width:680px;margin:0 auto;padding:18px 16px 60px}

/* Cards */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-top:16px}
.card{text-align:left;background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;cursor:pointer;transition:border-color .12s,box-shadow .12s;font:inherit;color:inherit}
.card:hover,.card:active{border-color:var(--blue);box-shadow:0 6px 20px rgba(46,107,230,.12)}
.card-name{font-weight:700;font-size:16px;color:var(--navy)}
.card-price{font-size:22px;font-weight:800;margin:6px 0 2px}
.card-note{font-size:12px;color:var(--muted)}
.empty{color:var(--muted);padding:24px 0}

/* Entry form */
.back{background:none;border:none;color:var(--blue);font-size:15px;cursor:pointer;padding:0;margin-bottom:8px}
#memberForm{margin-top:14px}
.frow{display:flex;gap:12px}
.frow .field{flex:1}
.field{margin-bottom:14px}
.field label{display:block;font-size:13px;font-weight:600;margin-bottom:5px}
.field input[type=text],.field input[type=email],.field input[type=tel],.field input[type=date]{width:100%;padding:12px;border:1px solid var(--line);border-radius:9px;font-size:16px;background:#fff}
.field input.invalid{border-color:var(--red)}
.ferr{display:block;color:var(--red);font-size:13px;margin-top:4px}
.photo-row input[type=file]{font-size:15px}
.photo-preview{display:block;width:96px;height:96px;object-fit:cover;border-radius:10px;border:1px solid var(--line);margin-top:10px}

/* Payment */
.pay{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:16px;margin:18px 0}
.pay-total{font-size:18px;margin-bottom:12px}
.pay-total strong{font-size:22px;color:var(--navy)}
.pay-methods{display:flex;gap:10px}
.pm{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);border-radius:9px;padding:12px;font-weight:600;cursor:pointer}
.pm input{accent-color:var(--blue);width:18px;height:18px}

.generr{color:var(--red);font-size:14px;margin-bottom:10px;min-height:18px}
.submit{width:100%;padding:15px;border:none;border-radius:10px;background:var(--navy);color:#fff;font-size:17px;font-weight:700;cursor:pointer}
.submit:disabled{opacity:.6}

/* Receipt */
#receipt{text-align:center;padding-top:20px}
.tick{width:64px;height:64px;border-radius:50%;background:var(--green);color:#fff;font-size:34px;line-height:64px;margin:0 auto 14px}
.rcpt{width:100%;max-width:380px;margin:18px auto;border-collapse:collapse;text-align:left}
.rcpt td{padding:11px 4px;border-bottom:1px solid var(--line);font-size:15px}
.rcpt td:first-child{color:var(--muted)}
.rcpt td:last-child{text-align:right;font-weight:600}
#receipt .submit{max-width:380px;margin:14px auto 0}
