/* =============================================================================
   الدخول والمحفظة والحساب — مقاسات وألوان الويدجتات نفسها:
   buildTextFormLogin / bulidTextFormSignUp (grey50، زوايا 15، إطار grey200)،
   bulidTextFormForgetPassword (إطار بزوايا 30)، buildTextFormGlobal (خط سفلي
   أزرق)، buildImageTalab (180×100، زوايا 10، ظل 1,1,10)، cBill.dart.
   ========================================================================== */

/* ---- الحقول (.af) --------------------------------------------------------- */

.af { margin: 0 0 12px; text-align: start; }
.af-box { position: relative; }
.af-input {
  --ps: 20px; --pe: 20px;
  width: 100%; height: 56px; font-size: 15px; outline: none;
  border: 1px solid rgba(0, 0, 0, .38); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
html[dir="rtl"] .af-input { padding-right: var(--ps); padding-left: var(--pe); text-align: right; }
html[dir="ltr"] .af-input { padding-left: var(--ps); padding-right: var(--pe); text-align: left; }
.af-ic { position: absolute; top: 50%; inset-inline-start: 12px; transform: translateY(-50%); display: flex; color: rgba(0, 0, 0, .45); pointer-events: none; }
.af-box.has-ic .af-input { --ps: 48px; }
.af-box > label {
  position: absolute; top: 50%; inset-inline-start: 20px; transform: translateY(-50%);
  color: var(--g500); font-size: 14px; pointer-events: none;
  transition: top .15s, font-size .15s, color .15s;
  max-width: calc(100% - 70px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.af-box.has-ic > label { inset-inline-start: 48px; }
.af-input:focus + label, .af-input:not(:placeholder-shown) + label { top: 12px; font-size: 12px; }
.af-input:focus + label { color: var(--primary); }
.af-input::placeholder { color: var(--g400); font-size: 14px; }
.af-err { color: #D32F2F; font-size: 12px; padding: 4px 12px 0; }
.af-err:empty { display: none; }
.af.has-err .af-input { border-color: #FF5252 !important; box-shadow: none; }
.af.has-err .af-box > label { color: #D32F2F; }
.af-count { text-align: end; font-size: 12px; color: var(--g600); padding: 2px 12px 0; }

/* buildTextFormLogin / bulidTextFormSignUp */
.af-login .af-input, .af-signup .af-input {
  height: 58px; border: 1.5px solid var(--g200); border-radius: 15px; background: var(--g50);
  font-size: 16px; font-weight: 500;
}
.af-login .af-input { padding-top: 16px; }
.af-login .af-input:focus, .af-signup .af-input:focus { border-color: var(--primary); box-shadow: 0 0 0 .5px var(--primary); }
.af-login .af-ic, .af-signup .af-ic { color: rgba(4, 161, 253, .8); }
.af-signup .af-input { font-size: 15px; }
.af-signup .af-box.has-eye .af-input { --pe: 48px; }
.af-eye { position: absolute; top: 50%; inset-inline-end: 8px; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--g400); }
.af-eye.on { color: var(--primary); }

/* bulidTextFormForgetPassword / ApproveUser — OutlineInputBorder(30) */
.af-pill .af-input { height: 48px; border-radius: 30px; }
.af-pill .af-input:focus { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }

/* buildTextFormGlobal / buildTextFormMoney — خط سفلي، تسمية زرقاء عائمة */
.af-line .af-input { border: 0; border-bottom: 1px solid var(--primary); border-radius: 0; padding-top: 16px; height: 56px; }
.af-line .af-input:focus { box-shadow: inset 0 -1px 0 var(--primary); }
.af-line .af-ic { color: var(--primary); }
.af-line .af-box > label { color: var(--primary); }

/* ---- شاشات الدخول --------------------------------------------------------- */

.page.auth-page { background: #fff; }
.auth-bar { height: 56px; display: flex; align-items: center; padding: 0 4px; position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .92); }
.auth-bar h1 { flex: 1; text-align: center; font-size: 20px; font-weight: 700; color: #000; }
.auth-bar .icon-btn { color: #000; }
.mat-appbar.center h1 { text-align: center; padding-inline-end: 60px; }

.login-body { padding: 10px 25px 20px; text-align: center; }
.login-logo { width: 120px; height: 120px; margin: 0 auto; border-radius: 50%; box-shadow: 0 10px 24px rgba(4, 161, 253, .15); overflow: hidden; } /* blurRadius 20 في فلاتر ≈ 24px */
.login-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-hello { margin-top: 30px; font-size: 26px; font-weight: 700; color: #424242; }
.login-sub { margin-top: 8px; font-size: 15px; color: var(--g600); }
.login-card { margin-top: 40px; padding: 20px; background: #fff; border-radius: 20px; box-shadow: 0 10px 20px rgba(0, 0, 0, .03), 0 0 0 1px rgba(0, 0, 0, .02); }
.login-card .af { margin-bottom: 15px; }
.auth-btn {
  width: 100%; height: 55px; margin-top: 15px; border-radius: 15px;
  background: var(--primary); color: #fff; font-size: 18px; font-weight: 700;
  box-shadow: 0 5px 12px rgba(4, 161, 253, .45);
}
.auth-btn:active { filter: brightness(.95); }
.login-signup {
  margin-top: 30px; width: 100%; padding: 12px 20px; border-radius: 15px;
  background: rgba(4, 161, 253, .05); border: 1px solid rgba(4, 161, 253, .2);
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px;
}
.login-signup span { color: #616161; }
.login-signup b { color: var(--primary); font-size: 15px; }
.login-forgot { margin-top: 15px; padding: 8px 14px; border-radius: 15px; color: var(--primary); font-size: 15px; font-weight: 600; }

.otp-body { padding: 0 30px 24px; text-align: center; }
.otp-ic { margin-top: 20px; color: var(--primary); }
.otp-ic .mi { font-size: 100px; }
.otp-title { margin-top: 30px; font-size: 24px; font-weight: 700; }
.otp-sub { margin: 10px 0 40px; color: var(--g600); font-size: 14px; }
.otp-input {
  width: 100%; height: 64px; text-align: center; font-size: 24px; font-weight: 700; letter-spacing: 10px;
  background: var(--g50); border: 1px solid var(--g300); border-radius: 15px; outline: none;
}
.otp-input:focus { border-color: var(--primary); }
.otp-input::placeholder { color: var(--g300); letter-spacing: 10px; }
.otp-body .auth-btn { margin-top: 50px; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.otp-resend { margin-top: 20px; padding: 8px 12px; color: var(--primary); }

.auth-form { margin-top: 20px; padding: 20px; }
.auth-form .af { margin-bottom: 20px; }
.auth-actions { display: flex; justify-content: center; margin-top: 20px; }
.outline-pill { background: var(--g50); padding: 10px 40px; border-radius: 50px; border: 2px solid var(--primary); font-size: 14px; }
.outline-pill:active { background: var(--g200); }
.auth-note { margin-top: 20px; }

/* ---- المحفظة -------------------------------------------------------------- */

.wallet-balance {
  margin: 4px 10px 0; padding: 8px 8px 8px 16px; border-radius: 12px;
  background: var(--primary-10); display: flex; align-items: center; gap: 10px;
}
html[dir="rtl"] .wallet-balance { padding: 8px 16px 8px 8px; }
.wallet-balance .lbl { color: var(--g600); }
.wallet-balance .val { flex: 1; color: var(--primary); font-weight: 700; font-size: 20px; text-align: end; }
.wallet-balance .val.muted { opacity: .5; }
.wallet-balance .icon-btn { color: var(--primary); width: 40px; height: 40px; }

/* Theme.textTheme.headlineMedium = 16px black54 */
.money-title { margin-top: 10px; padding: 10px; text-align: center; font-size: 16px; font-weight: 400; color: rgba(0, 0, 0, .54); }
.money-row { padding: 5px 20px 10px; gap: 10px; }

/* buildImageTalab */
.talab {
  width: 180px; background: #fff; border-radius: 10px; box-shadow: var(--shadow-tile);
  margin-bottom: 10px; display: flex; flex-direction: column; align-items: center; overflow: hidden;
}
.talab .img { width: 100%; height: 100px; border-radius: 10px; display: block; background: var(--g200); }
.talab > span:last-child { font-weight: 700; padding: 5px 6px 6px; }

/* buildListMoneyUsers */
.money-list.card { display: flex; align-items: center; width: calc(100% - 40px); margin: 4px 20px 8px; text-align: start; }
.money-list .pic { width: 110px; height: 100px; flex: none; }
.money-list .pic .img { width: 100%; height: 100%; display: block; }
.money-list .txt { flex: 1; padding: 8px 16px; display: flex; flex-direction: column; }
.money-list .txt b { color: var(--primary); font-size: 16px; }
.money-list .txt small { font-size: 14px; color: var(--text-2); }

/* ---- كشف الحساب (cBill.dart) --------------------------------------------- */

.bill .card { margin: 4px; }
.bill-top { padding: 0; }
.bill-row { display: flex; justify-content: space-between; align-items: center; padding: 8px; }
.bill-row .m { color: var(--g500); }
.bill-row .b { font-weight: 700; }
.bill-days { display: flex; justify-content: space-around; padding: 10px; }
.bill-days button { display: flex; flex-direction: column; align-items: center; color: var(--red); line-height: 1.4; padding: 2px 6px; border-radius: 8px; }
.bill-days button.active { background: #FFEBEE; }
.bill-head { display: flex; justify-content: space-between; padding: 10px 20px; font-size: 14px; }
.bill-item { border-bottom: 1px solid rgba(0, 0, 0, .12); padding: 6px 0; }
.bill-item .id { text-align: center; color: var(--red); }
.bill-item .c { padding: 1px 10px; }
.bill-item.out .c { color: var(--primary); }
.bill-item.in .c { color: var(--green); }
.bill-item .r { display: flex; justify-content: space-between; align-items: center; }
.bill-item .r .c { padding: 1px 8px; white-space: pre; }
.bill-sentinel { height: 1px; }

/* ---- نماذج المال (تعبئة/سحب/تحويل) --------------------------------------- */

.money-form { padding: 10px; }
.money-btn {
  background: var(--primary); color: #fff; min-height: 36px; padding: 5px 40px; border-radius: 2px;
  font-weight: 500; box-shadow: 0 2px 2px rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12), 0 1px 5px rgba(0, 0, 0, .2);
}
.money-btn.r10 { border-radius: 10px; }
.money-btn:active { filter: brightness(.93); }
.money-actions { display: flex; justify-content: center; margin-top: 20px; }
.charge-actions { padding: 20px clamp(16px, 18vw, 100px); }
.charge-actions .money-btn { width: 100%; }

.addcard .money-title { margin-top: 0; color: var(--primary); font-weight: 700; }
.addcard-label { margin-top: 28px; }
.addcard-exp { display: flex; gap: 20px; }
.addcard-exp .af { flex: 1; min-width: 0; }
.addcard-note { margin-top: 28px; }

.send-code { display: flex; justify-content: center; margin-top: 6px; }
.send-hint { text-align: center; }
.send-type { margin-top: 20px; }
.send-type p { text-align: center; }
.send-type .tile { min-height: 48px; padding: 4px 16px; }

/* InvoiceSendMoney */
.receipt { padding-bottom: 10px; }
.receipt h2 { padding: 10px; text-align: center; font-size: 18px; font-weight: 700; }
.receipt .ok { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--green); font-weight: 700; font-size: 20px; }
.receipt .tile { cursor: default; min-height: 48px; }
.divider.inset { margin: 0 10px; }

/* ---- حسابي ---------------------------------------------------------------- */

.profile-head { display: flex; align-items: center; gap: 15px; padding: 16px 20px; margin: 4px 10px 0; border-radius: 16px; background: #fff; box-shadow: 0 5px 10px rgba(0, 0, 0, .05); }
.profile-head .avatar { width: 68px; height: 68px; border-radius: 50%; border: 2px solid rgba(4, 161, 253, .5); background: var(--primary); color: #fff; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.profile-head .avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-head .n { font-weight: 700; font-size: 18px; }
.profile-head .p { color: var(--g600); font-size: 13px; }
.profile-head .bal { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 20px; background: var(--primary-10); color: var(--primary); font-weight: 700; }

.talab-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); justify-content: space-around; gap: 20px 10px; padding: 30px 10px 10px; }
.talab-grid .talab { width: 100%; margin-bottom: 0; }
.talab.icon .ico { width: 100%; height: 100px; border-radius: 10px; background: var(--primary-10); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.talab.icon .ico .mi { font-size: 44px; }
.talab.icon.danger .ico { background: #FFEBEE; color: #EF5350; }
.talab.icon.danger > span:last-child { color: #EF5350; }
