/* Sookth Mobile Pigmy portal. The agent's pages are made for a phone held in one hand: one column, big touch
   targets, a bottom tab bar. The admin pages are plain Bootstrap. */
:root {
    --mp-accent: #0e7490;
    --mp-accent-2: #0891b2;
    --mp-bg: #eef3f6;
    --mp-card: #ffffff;
    --mp-text: #0f1f2a;
    --mp-dim: #5b6b77;
    --mp-line: #dfe6ec;
    --mp-good: #15803d;
}
body { background: var(--mp-bg); color: var(--mp-text); }
.mp-agent { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
.mp-agent.has-tabs { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
.mp-main { max-width: 520px; margin: 0 auto; padding: 14px 14px 24px; }

/* top bar */
.mp-top { background: linear-gradient(135deg, var(--mp-accent), var(--mp-accent-2)); color: #fff; position: sticky; top: 0; z-index: 20;
          padding-top: env(safe-area-inset-top); box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.mp-top-inner { max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.mp-avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.45);
             display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.mp-who { min-width: 0; flex: 1; }
.mp-name { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-code { font-weight: 400; opacity: .75; font-size: 13px; }
.mp-branch { font-size: 12px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-logout { color: #fff; font-size: 22px; padding: 4px 6px; }

/* bottom tabs */
.mp-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--mp-line);
           display: flex; justify-content: space-around; padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.mp-tabs a { flex: 1; max-width: 130px; text-align: center; color: var(--mp-dim); text-decoration: none; font-size: 11px; font-weight: 600; padding: 4px 0; }
.mp-tabs a i { display: block; font-size: 21px; line-height: 1.2; }
.mp-tabs a.active { color: var(--mp-accent); }

/* cards */
.mp-card { background: var(--mp-card); border-radius: 14px; border: 1px solid var(--mp-line); padding: 16px; margin-bottom: 12px;
           box-shadow: 0 1px 6px rgba(15,31,42,.04); }
.mp-card h2 { font-size: 15px; font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.mp-card h2 i { color: var(--mp-accent); }
.mp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.mp-stat { background: #fff; border-radius: 12px; border: 1px solid var(--mp-line); padding: 10px 12px; border-left: 4px solid var(--mp-accent); }
.mp-stat.good { border-left-color: var(--mp-good); }
.mp-stat .label { font-size: 11px; color: var(--mp-dim); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.mp-stat .value { font-size: 18px; font-weight: 700; }
.mp-stat .sub { font-size: 12px; color: var(--mp-dim); }

/* forms: large on a phone */
.mp-agent .form-control, .mp-agent .form-select { min-height: 46px; font-size: 16px; border-radius: 10px; }
.mp-agent .btn-lg { border-radius: 12px; font-weight: 600; }
.mp-amount { font-size: 26px !important; font-weight: 700; text-align: right; }
.btn-mp { background: var(--mp-accent); border-color: var(--mp-accent); color: #fff; }
.btn-mp:hover, .btn-mp:focus { background: #0b5f76; border-color: #0b5f76; color: #fff; }

/* account picker */
.mp-search { position: relative; }
.mp-list { max-height: 45vh; overflow-y: auto; border: 1px solid var(--mp-line); border-radius: 10px; margin-top: 6px; background: #fff; }
.mp-item { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--mp-line);
           background: #fff; padding: 10px 12px; }
.mp-item:last-child { border-bottom: 0; }
.mp-item:active, .mp-item:hover { background: #f0f7fa; }
.mp-item .no { font-weight: 700; }
.mp-item .nm { font-size: 13px; color: var(--mp-dim); }
.mp-item .bal { font-weight: 600; white-space: nowrap; }
.mp-item .done { color: var(--mp-good); font-size: 12px; }
.mp-chosen { background: #f0f7fa; border-radius: 12px; padding: 12px; border: 1px solid #cfe4ec; }
.mp-chosen .row-l { display: flex; justify-content: space-between; font-size: 14px; padding: 2px 0; }
.mp-chosen .row-l span:first-child { color: var(--mp-dim); }

/* receipt */
.mp-receipt { background: #fff; border-radius: 14px; border: 1px dashed #9fb4bf; padding: 18px; }
.mp-receipt .tick { width: 56px; height: 56px; border-radius: 50%; background: #dcfce7; color: var(--mp-good); display: flex; align-items: center;
                    justify-content: center; font-size: 30px; margin: 0 auto 8px; }
.mp-receipt .amt { font-size: 30px; font-weight: 800; text-align: center; }
.mp-receipt dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 14px 0 0; font-size: 14px; }
.mp-receipt dt { color: var(--mp-dim); font-weight: 500; }
.mp-receipt dd { margin: 0; text-align: right; font-weight: 600; word-break: break-word; }
.mp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }

/* tables */
.mp-table { font-size: 14px; }
.mp-table td, .mp-table th { padding: 6px 8px; }
.mp-group { font-weight: 700; background: #f3f7f9; }

/* login */
.mp-login { max-width: 420px; margin: 0 auto; padding-top: 6vh; }
.mp-logo { width: 72px; height: 72px; border-radius: 20px; background: linear-gradient(135deg, var(--mp-accent), var(--mp-accent-2)); color: #fff;
           display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 12px; box-shadow: 0 8px 22px rgba(14,116,144,.3); }
.mp-pin { letter-spacing: .6em; text-align: center; font-size: 22px !important; font-weight: 700; }

/* admin */
.mp-admin-bar { background: #0f2a36; }
.mp-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #f4f6f8; border-radius: 6px; padding: 2px 6px; word-break: break-all; white-space: pre-wrap; }

/* statement */
.mp-statement .credit { color: var(--mp-good); }
.mp-statement .debit { color: #b91c1c; }

@media print {
    .mp-top, .mp-tabs, .no-print, .alert { display: none !important; }
    body, .mp-agent { background: #fff; padding: 0; }
    .mp-receipt { border: 0; }
}
