/* Agent portal (adminse/agent) — made for phones first */
body { background: #eef3ee; color: #13261a; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

/* sign in */
.ag-login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(120% 90% at 50% 0%, #1f4a2c, #0b1a10); }
.ag-login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; padding: 26px 22px; box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6); }
.ag-login-logo { display: block; height: 70px; margin: 0 auto 10px; }
.ag-login h1 { font-size: 1.4rem; font-weight: 800; text-align: center; margin: 0; }
.ag-login-card > p { text-align: center; color: #5c6b60; font-size: .9rem; margin: 4px 0 18px; }
.ag-msg { background: #fde8e8; color: #9b1c1c; border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.ag-help { font-size: .8rem; color: #6b776f; text-align: center; margin: 14px 0 0; }

/* top bar */
.ag-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #13331e; color: #fff; }
.ag-top img { height: 28px; background: #fff; border-radius: 6px; padding: 2px 6px; }
.ag-who { flex: 1; display: grid; line-height: 1.15; min-width: 0; }
.ag-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-who small { opacity: .7; font-family: monospace; }

.ag-main { max-width: 900px; margin: 0 auto; padding: 16px; }
.ag-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ag-bar label { font-weight: 600; font-size: .9rem; }
.ag-bar .form-select { width: auto; flex: 1; max-width: 200px; }

.ag-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 768px) { .ag-tiles { grid-template-columns: repeat(4, 1fr); } }
.ag-tiles > div { background: #fff; border-radius: 16px; padding: 12px 14px; display: grid; gap: 2px; box-shadow: 0 6px 16px -14px rgba(0, 0, 0, .5); }
.ag-tiles small { color: #5c6b60; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.ag-tiles b { font-size: 1.15rem; }
.ag-tiles span { color: #6b776f; font-size: .78rem; }
.ag-tiles .in b { color: #b45309; }
.ag-tiles .comm { background: #e3f6d9; }

.ag-tabs { gap: 6px; margin-bottom: 12px; }
.ag-tabs .nav-link { border-radius: 999px; color: #13261a; background: #fff; font-weight: 600; }
.ag-tabs .nav-link.active { background: #2f7d3a; color: #fff; }

.ag-line { background: #fff; border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; box-shadow: 0 6px 16px -14px rgba(0, 0, 0, .5); }
.ag-line.bf { background: #f5f7f4; }
.ag-date { font-weight: 700; padding: 2px 0 6px; border-bottom: 1px solid #e6ebe5; margin-bottom: 4px; }
.ag-kv { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .92rem; }
.ag-kv span { color: #5c6b60; }
.ag-kv.bal { border-top: 1px dashed #dfe5de; margin-top: 4px; padding-top: 6px; }
.ag-empty { text-align: center; color: #6b776f; padding: 20px; }

.ag-table { background: #fff; border-radius: 16px; padding: 8px 12px; }
.ag-table tfoot th { border-top: 2px solid #2f7d3a; }
.ag-sum { display: grid; gap: 8px; margin-top: 12px; }
.ag-sum div { display: flex; justify-content: space-between; background: #fff; border-radius: 12px; padding: 10px 14px; }
.ag-sum div:last-child { background: #e3f6d9; }
.ag-foot { text-align: center; font-size: .8rem; color: #6b776f; margin-top: 20px; }
.ag-table .table { font-size: .85rem; }
.ag-table th, .ag-table td { padding-left: 4px; padding-right: 4px; white-space: nowrap; }

/* tabs under the top bar */
.ag-nav { display: flex; gap: 6px; padding: 8px 16px; background: #1b4428; position: sticky; top: 48px; z-index: 9; }
.ag-nav a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 999px; color: #d6ead9; text-decoration: none; font-weight: 600; font-size: .9rem; }
.ag-nav a.on { background: #fff; color: #13331e; }
.ag-top img.ag-av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; padding: 0; }

/* profile */
.ag-card { background: #fff; border-radius: 18px; padding: 16px; margin-bottom: 14px; box-shadow: 0 6px 16px -14px rgba(0, 0, 0, .5); }
.ag-card h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 12px; }
.ag-card h3 { font-size: .9rem; font-weight: 700; margin: 6px 0 0; color: #2f7d3a; }
.ag-me { display: flex; align-items: center; gap: 16px; }
.ag-me h1 { font-size: 1.2rem; font-weight: 800; margin: 0; }
.ag-me p { margin: 2px 0 0; color: #5c6b60; }
.ag-photo { position: relative; width: 84px; height: 84px; flex: none; cursor: pointer; margin: 0; }
.ag-photo img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #e3f6d9; background: #fff; }
.ag-photo span { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: #2f7d3a; color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.ag-msg.ok { background: #e3f6d9; color: #1f5f2b; }

/* sidebar (slides in on phones, stays open on big screens) */
.ag-side { background: #13331e; color: #fff; --bs-offcanvas-width: 250px; }
.ag-side-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ag-side-head img { height: 28px; background: #fff; border-radius: 6px; padding: 2px 6px; }
.ag-side-nav { display: grid; gap: 4px; padding: 12px 10px; }
.ag-side-nav a { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; color: #d6ead9; text-decoration: none; font-weight: 600; }
.ag-side-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ag-side-nav a.on { background: #fff; color: #13331e; }
.ag-side-nav a.out { margin-top: 10px; border-top: 1px solid rgba(255, 255, 255, .1); border-radius: 0 0 12px 12px; color: #f3c5c5; }
.ag-side-nav i { font-size: 1.15rem; }
@media (min-width: 992px) {
  .ag-body { padding-left: 250px; }
  .ag-side { position: fixed; top: 0; bottom: 0; left: 0; width: 250px; overflow-y: auto; z-index: 20; background: #13331e !important; }
}

/* buying pages */
.ag-h { font-size: 1rem; font-weight: 800; margin: 18px 0 10px; }
.ag-btns { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 8px; }
.ag-btns .btn { flex: 1; }
.ag-find { flex: 1; min-width: 150px; }
.ag-tiles .spent { background: #fff7e6; }
.ag-tiles .spent b { color: #9a5b00; }
.ag-tiles > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 768px) {
  .ag-tiles { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .ag-tiles > div:last-child:nth-child(odd) { grid-column: auto; }
}
.ag-card .form-control, .ag-card .form-select { min-height: 44px; }
