/* ===== RideFly — وضع الوكيل (agent mode) ============================
 * Styles ONLY for the pieces this module injects into the customer site.
 * Every selector is namespaced (.ag-*, .rf-agent) so nothing here can leak
 * into styles.css territory or change the customer UI. Owned by the AGENCY
 * session — see memory ridefly-agency-agent-mode-pivot.
 * ================================================================== */

/* ---- the «دخول كوكيل» door inside the customer login modal ---- */
.ag-entry { margin-top: 14px; }
.ag-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink-2, #6b7192); font-size: 13px; font-weight: 700; margin-bottom: 12px;
}
.ag-or::before, .ag-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line, #e6e8f2);
}
.ag-entry-btn {
  width: 100%; padding: 12px 14px; cursor: pointer;
  border: 1.5px solid rgba(20, 12, 104, .18); border-radius: 12px;
  background: rgba(20, 12, 104, .04); color: #140c68;
  font: inherit; font-weight: 800; font-size: 15px;
  transition: background .15s, border-color .15s, transform .12s;
}
.ag-entry-btn:hover {
  background: rgba(20, 12, 104, .08); border-color: rgba(20, 12, 104, .3); transform: translateY(-1px);
}

/* ---- agent screens rendered inside the shared modal card ---- */
.ag-m-head { margin-bottom: 6px; }
.ag-m-badge {
  display: inline-block; font-size: 12.5px; font-weight: 800; color: #ff2a52;
  background: rgba(255, 42, 82, .10); border: 1px solid rgba(255, 42, 82, .24);
  padding: 5px 13px; border-radius: 999px;
}
.ag-m-sub {
  color: var(--ink-2, #6b7192); font-size: 14px; line-height: 1.75; margin: 8px 0 16px;
}
.ag-form { display: flex; flex-direction: column; gap: 11px; }
.ag-in { width: 100%; }
.ag-in[dir="ltr"] { text-align: left; }
.ag-otp { letter-spacing: 6px; text-align: center; font-weight: 800; font-size: 19px; }
.ag-pw-wrap { position: relative; }
.ag-pw-toggle {
  position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700;
  color: var(--ink-2, #6b7192); padding: 4px 8px; border-radius: 8px;
}
.ag-pw-toggle:hover { background: rgba(0, 0, 0, .05); }
.ag-btn { width: 100%; margin-top: 2px; }
.ag-link {
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 13.5px; font-weight: 700;
  color: #ff2a52; padding: 6px; text-align: center;
}
.ag-link:hover { text-decoration: underline; }
.ag-back { color: var(--ink-2, #6b7192); }
.ag-err {
  background: #fff1f3; border: 1px solid #ffd0d8; color: #b3123a;
  padding: 11px 14px; border-radius: 11px; font-size: 14px; font-weight: 700;
  margin-bottom: 14px; line-height: 1.65;
}
.ag-soon-box {
  background: #f7f8fd; border: 1px solid var(--line, #e6e8f2); border-radius: 12px;
  padding: 20px; font-size: 14.5px; line-height: 1.85; color: var(--ink-2, #4a5070);
}
.ag-soon-box b { color: #140c68; }

/* ---- agent identity on the normal site ---- */
.ag-chip {
  display: inline-block; background: rgba(255, 255, 255, .22); color: inherit;
  font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 999px;
  margin-inline-end: 6px; vertical-align: middle;
}
.ag-account-btn { font-weight: 800; }
.rf-agent .nav { box-shadow: inset 0 -3px 0 0 #ff2a52; }

/* ---- agency block inside the existing account menu ---- */
.ag-menu-box {
  border-bottom: 1px solid var(--line, #e6e8f2); padding-bottom: 8px; margin-bottom: 8px;
}
.ag-menu-head {
  font-size: 12px; font-weight: 900; color: #140c68; opacity: .72;
  padding: 8px 12px 6px; letter-spacing: .2px;
}
.ag-menu-box button {
  display: block; width: 100%; text-align: start; padding: 10px 12px;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 700;
  border-radius: 9px; color: inherit;
}
.ag-menu-box button:hover { background: rgba(20, 12, 104, .06); }
.ag-menu-out { color: #b3123a !important; }

/* ---- standalone fallback toast (only used if app.js's toast is absent) ---- */
.ag-toast {
  position: fixed; inset-block-end: 26px; inset-inline-start: 50%; transform: translateX(50%);
  background: #140c68; color: #fff; padding: 13px 24px; border-radius: 999px;
  font-weight: 700; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); z-index: 9999;
}
.ag-toast.bad { background: #b3123a; }

@media (prefers-color-scheme: dark) {
  .ag-soon-box { background: rgba(255, 255, 255, .04); }
}

/* ---- wallet ---- */
.ag-note { background:#eef7f1; border:1px solid #cfe8da; color:#0f7a4d; padding:10px 13px;
  border-radius:10px; font-size:13.5px; font-weight:700; margin-bottom:12px; }
.ag-loading { text-align:center; color:var(--ink-2,#6b7192); padding:22px; font-size:14px; }
.ag-bal-row { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
.ag-bal { flex:1 1 140px; border:1.5px solid var(--line,#e6e8f2); border-radius:12px;
  padding:12px 14px; cursor:pointer; background:#fbfcff; transition:border-color .15s,background .15s; }
.ag-bal:hover { border-color:#c8ccdf; }
.ag-bal.on { border-color:#ff2a52; background:rgba(255,42,82,.05); }
.ag-bal .c { font-size:12px; font-weight:800; color:var(--ink-2,#6b7192); }
.ag-bal .v { font-size:21px; font-weight:900; margin:3px 0 2px; color:#140c68; }
.ag-bal .n { font-size:11px; color:var(--ink-2,#6b7192); direction:ltr; text-align:start; }
.ag-wal-actions { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:6px; }
.ag-wal-actions button { flex:1 1 auto; }
.ag-btn2 { padding:11px 14px; font-size:14px; font-weight:800; border-radius:11px; }
.ag-sub-card { margin-top:14px; border-top:1px solid var(--line,#e6e8f2); padding-top:14px; }
.ag-sub-card h4 { font-size:16px; font-weight:900; margin-bottom:6px; }
.ag-row2 { display:flex; gap:8px; }
.ag-row2 select { flex:0 0 96px; }
.ag-row2 input { flex:1 1 auto; }
.ag-quote { background:#f7f8fd; border:1px solid var(--line,#e6e8f2); border-radius:11px;
  padding:12px 14px; font-size:14px; line-height:1.9; }
.ag-quote .s { color:var(--ink-2,#6b7192); font-size:13px; }
.ag-stmt { max-height:320px; overflow-y:auto; }
.ag-stmt-r { display:flex; align-items:center; gap:10px; padding:9px 2px;
  border-bottom:1px solid var(--line,#e6e8f2); font-size:13.5px; }
.ag-stmt-r .d { flex:0 0 104px; color:var(--ink-2,#6b7192); font-size:12px; direction:ltr; text-align:start; }
.ag-stmt-r .t { flex:1 1 auto; font-weight:600; }
.ag-stmt-r .a { flex:0 0 auto; font-weight:900; color:#0f9d63; direction:ltr; }
.ag-stmt-r .a.neg { color:#b3123a; }
.ag-menu-main { color: #ff2a52 !important; font-weight: 900 !important; }

/* ================= agent theme (only while an agent is signed in) ========= */
/* Visible enough that an agent KNOWS he is in an agency session, restrained
   enough that the site still looks like itself. Namespaced under .rf-agent, so
   a customer never matches any of it. */
.rf-agent .nav {
  box-shadow: inset 0 -3px 0 0 #ff2a52, 0 2px 14px rgba(20, 12, 104, .10);
  border-top: 3px solid #140c68;
}
/* a quiet agency band under the header — name only, no messages */
.ag-whobar {
  background: #140c68; color: #fff; font-size: 13px; font-weight: 800;
  padding: 7px 16px; display: flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: .2px;
}
.ag-whobar .t { color: #ff8aa3; font-weight: 900; }
.rf-agent .ag-account-btn {
  background: linear-gradient(135deg, #ff6155, #ff2a52) !important;
  color: #fff !important; border: 0 !important;
}
.ag-acct { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 8px; }
.ag-acct-i .n { font-weight: 900; font-size: 14px; color: #140c68; }
.ag-acct-i .u { font-size: 11.5px; color: #6b7192; direction: ltr; text-align: start; }
.ag-topup { background: #0f9d63; color: #fff !important; font-size: 12px; font-weight: 900;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.ag-bals { display: flex; flex-direction: column; gap: 6px; padding: 0 12px 10px; }
.ag-bal-row { display: flex; align-items: center; justify-content: space-between;
  background: #f5f7fd; border: 1px solid #e6e8f2; border-radius: 10px; padding: 8px 11px; }
.ag-bal-row span { font-size: 11px; font-weight: 800; color: #6b7192; }
.ag-bal-row b { font-size: 14px; font-weight: 900; color: #140c68; }
