/* مساعد المعلم DZ — UI V5.27
   Professional account / subscription experience.
   UI-only layer; core V5.23.5 behavior and existing element IDs remain intact. */

:root{
  --v527-navy:#0f3155;
  --v527-blue:#1d78d4;
  --v527-blue2:#2f8ee7;
  --v527-teal:#16a085;
  --v527-mint:#eaf9f4;
  --v527-ink:#102c49;
  --v527-muted:#6d8398;
  --v527-line:#d9e7f2;
  --v527-soft:#f5f9fd;
  --v527-shadow:0 26px 70px rgba(8,42,72,.22);
  --v527-shadow-sm:0 12px 30px rgba(21,70,108,.08);
}

/* ---------- Account overlay ---------- */
.v527-account-overlay{
  padding:24px!important;
  background:rgba(7,29,50,.53)!important;
  backdrop-filter:blur(12px) saturate(115%);
  -webkit-backdrop-filter:blur(12px) saturate(115%);
}
.v527-account-panel{
  width:min(1120px,calc(100vw - 48px))!important;
  max-width:1120px!important;
  max-height:min(900px,calc(100dvh - 48px))!important;
  padding:0!important;
  border:1px solid rgba(216,231,242,.96)!important;
  border-radius:28px!important;
  background:
    radial-gradient(circle at 94% 4%,rgba(68,163,235,.13),transparent 24%),
    radial-gradient(circle at 8% 88%,rgba(36,174,140,.09),transparent 22%),
    #f8fbfe!important;
  box-shadow:var(--v527-shadow)!important;
  overflow:auto!important;
  scrollbar-width:thin;
  scrollbar-color:#bfd4e5 transparent;
}
.v527-account-panel::-webkit-scrollbar{width:9px}
.v527-account-panel::-webkit-scrollbar-thumb{background:#bfd4e5;border-radius:20px;border:2px solid transparent;background-clip:padding-box}

.v527-account-head{
  position:sticky;
  top:0;
  z-index:15;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:22px 24px 17px;
  border-bottom:1px solid rgba(215,229,240,.9);
  background:rgba(255,255,255,.91);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.v527-account-heading{display:flex;align-items:center;gap:14px;min-width:0}
.v527-account-symbol{
  flex:0 0 auto;
  width:50px;height:50px;
  display:grid;place-items:center;
  border-radius:16px;
  color:#fff;
  background:linear-gradient(145deg,var(--v527-blue2),var(--v527-blue) 62%,#1262b0);
  box-shadow:0 10px 24px rgba(33,123,207,.25);
}
.v527-account-symbol svg{width:28px;height:28px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.v527-eyebrow{display:block;margin-bottom:2px;color:var(--v527-teal);font-size:10px;font-weight:850;letter-spacing:.01em}
.v527-account-heading h2{margin:0!important;color:var(--v527-ink);font-size:23px!important;line-height:1.25}
.v527-account-heading p{margin:5px 0 0;color:var(--v527-muted);font-size:11px;line-height:1.65}
.v527-account-close{
  flex:0 0 auto!important;
  display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
  min-width:88px!important;height:40px!important;padding:0 12px!important;
  border:1px solid #d6e3ee!important;border-radius:12px!important;background:#fff!important;color:#38566f!important;
  box-shadow:0 5px 14px rgba(18,59,91,.05)!important;
}
.v527-account-close span{font-size:22px;line-height:1;font-weight:500}.v527-account-close b{font-size:10px}
.v527-account-close:hover{border-color:#9ec9e9!important;color:#116fc5!important;transform:translateY(-1px)}

.v527-account-trust{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  padding:16px 24px 0;
}
.v527-account-trust>span{
  display:grid;
  grid-template-columns:31px 1fr;
  grid-template-rows:auto auto;
  column-gap:9px;
  align-items:center;
  min-height:58px;
  padding:10px 12px;
  border:1px solid #dbe9f3;
  border-radius:15px;
  background:rgba(255,255,255,.84);
  box-shadow:0 7px 20px rgba(20,67,105,.045);
}
.v527-account-trust i{grid-row:1/3;width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:var(--v527-mint);color:#118d70;font-style:normal;font-size:15px;font-weight:900}
.v527-account-trust b{font-size:10.5px;color:#183a58}.v527-account-trust small{font-size:8.7px;color:#7b8fa1;margin-top:2px}

.v527-account-layout{
  display:grid;
  grid-template-columns:minmax(340px,.86fr) minmax(500px,1.14fr);
  gap:18px;
  padding:18px 24px 24px;
  align-items:start;
}
.v527-auth-zone,.v527-commerce-zone{
  min-width:0;
  border:1px solid #dce9f3;
  border-radius:22px;
  box-shadow:var(--v527-shadow-sm);
}
.v527-auth-zone{
  padding:18px;
  background:linear-gradient(160deg,#f4f9ff 0%,#fff 45%,#f8fcff 100%);
}
.v527-commerce-zone{
  padding:18px;
  background:rgba(255,255,255,.95);
}
.v527-section-heading{margin-bottom:14px;padding:0 2px}
.v527-section-heading>span{display:inline-flex;padding:4px 9px;border-radius:999px;background:#eaf4ff;color:#1974c7;font-size:8.7px;font-weight:850}
.v527-section-heading h3{margin:7px 0 2px;color:var(--v527-ink);font-size:17px;line-height:1.35}
.v527-section-heading p{margin:0;color:#71869a;font-size:9.4px;line-height:1.7}
.v527-plan-heading>span{background:#e9f8f3;color:#138568}

/* ---------- Auth ---------- */
.v527-auth-card{
  padding:14px!important;
  border:1px solid #dce8f2!important;
  border-radius:17px!important;
  background:#fff!important;
  box-shadow:0 9px 24px rgba(18,62,97,.055)!important;
}
.v527-auth-card .auth-tabs{
  display:grid!important;
  grid-template-columns:repeat(2,1fr)!important;
  gap:5px!important;
  padding:4px!important;
  margin:0 0 14px!important;
  border:1px solid #dce8f1!important;
  border-radius:13px!important;
  background:#f4f8fc!important;
}
.v527-auth-card .auth-tab{
  min-height:39px!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#5e758b!important;
  box-shadow:none!important;
  font-size:10px!important;
  font-weight:800!important;
}
.v527-auth-card .auth-tab.active{
  background:#fff!important;
  color:#164f7d!important;
  box-shadow:0 5px 14px rgba(20,67,104,.1)!important;
}
.v527-login-intro{margin:0 0 14px;padding:11px 12px;border-radius:13px;background:linear-gradient(135deg,#eef7ff,#f9fcff);border:1px solid #dcebf5}
.v527-login-intro b{display:block;color:#173b5b;font-size:11.5px}.v527-login-intro span{display:block;margin-top:3px;color:#71869a;font-size:8.8px;line-height:1.65}
.v527-auth-card .auth-grid{gap:10px!important;margin-bottom:11px!important}
.v527-auth-card label{display:block!important;margin:0 0 5px!important;color:#49667f!important;font-size:9.1px!important;font-weight:800!important}
.v527-auth-card input,.v527-auth-card select{
  width:100%!important;
  min-height:45px!important;
  padding:0 12px!important;
  border:1px solid #d8e5ef!important;
  border-radius:11px!important;
  background:#fbfdff!important;
  color:#17344f!important;
  outline:none!important;
  box-shadow:inset 0 1px 1px rgba(18,61,94,.02)!important;
  transition:border-color .18s,box-shadow .18s,background .18s!important;
}
.v527-auth-card input:focus,.v527-auth-card select:focus{border-color:#6bb0e8!important;background:#fff!important;box-shadow:0 0 0 3px rgba(41,137,216,.10)!important}
.v527-primary-action{
  width:100%!important;
  min-height:44px!important;
  margin-top:4px!important;
  border:0!important;
  border-radius:11px!important;
  background:linear-gradient(135deg,#2d82dc,#176bc5)!important;
  color:#fff!important;
  box-shadow:0 9px 21px rgba(29,115,198,.2)!important;
  font-weight:850!important;
}
.v527-primary-action:hover{transform:translateY(-1px);box-shadow:0 12px 27px rgba(29,115,198,.25)!important}
.v527-auth-card .forgot-btn{display:block!important;margin:9px auto 0!important;color:#1474c9!important;font-size:9.2px!important;font-weight:800!important}
.v527-auth-card .auth-message{margin-top:13px!important;padding:10px 11px!important;border-radius:11px!important;font-size:8.6px!important;line-height:1.65!important}
.v527-auth-card .privacy-consent{padding:9px 10px;border-radius:11px;background:#f7fafc;border:1px solid #e2ebf2}.v527-auth-card .privacy-consent label{display:flex!important;gap:7px;align-items:flex-start!important;margin:0!important}.v527-auth-card .privacy-consent input{width:16px!important;height:16px!important;min-height:16px!important;margin-top:1px!important;flex:0 0 auto}
.v527-profile-head{display:flex;align-items:center;gap:10px;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid #e5edf4}.v527-profile-avatar{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(135deg,#1d7bd5,#19a287);color:#fff;font-size:11px;font-weight:900;box-shadow:0 8px 18px rgba(27,128,160,.18)}.v527-profile-head small{display:block;color:#7e91a2;font-size:8.4px}.v527-profile-head b{display:block;margin-top:2px;color:#173a58;font-size:11.5px}
.v527-auth-card .account-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}.v527-auth-card .account-actions button{min-height:38px!important;border-radius:10px!important;font-size:8.8px!important}

/* ---------- Commerce summary ---------- */
.v527-commerce-summary{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-bottom:10px}
.v527-status-card,.v527-gateway-card{
  min-height:82px!important;
  display:flex!important;
  align-items:flex-start!important;
  gap:10px!important;
  padding:12px!important;
  border:1px solid #dbe7f0!important;
  border-radius:14px!important;
  background:linear-gradient(145deg,#f8fbfe,#fff)!important;
  color:#183850!important;
  box-shadow:none!important;
}
.v527-status-icon{flex:0 0 auto;width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:#e9f4ff;color:#1778cf;font-size:14px;font-weight:900}
.v527-status-card.active .v527-status-icon{background:#e6f8f1;color:#12896c}.v527-status-card.danger .v527-status-icon{background:#fff0f0;color:#d65353}.v527-status-card.expired .v527-status-icon{background:#fff5df;color:#bf7c0b}
.v527-status-card small,.v527-gateway-card small{display:block;color:#8193a4;font-size:7.9px;font-weight:800}.v527-status-card b,.v527-gateway-card b{display:block;margin:2px 0;color:#153957;font-size:10.5px}.v527-status-card span,.v527-gateway-card span{display:block;color:#70869a;font-size:8.2px;line-height:1.55}.v527-status-card em{display:block;margin-top:3px;color:#1578ca;font-size:8px;font-style:normal;font-weight:800}
.v527-gateway-dot{flex:0 0 auto;width:12px;height:12px;margin-top:8px;border-radius:50%;background:#e5a638;box-shadow:0 0 0 5px #fff4da}.v527-gateway-card.ready .v527-gateway-dot{background:#21a57f;box-shadow:0 0 0 5px #e7f8f2}

.v527-commerce-zone .commerce-costs{
  margin:0 0 12px!important;
  padding:12px!important;
  border:1px solid #dce9f2!important;
  border-radius:14px!important;
  background:#f8fbfe!important;
  color:#193a57!important;
}
.v527-cost-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.v527-cost-head small{display:block;color:#19896d;font-size:7.8px;font-weight:850}.v527-cost-head b{display:block;margin-top:2px;font-size:10px}.v527-cost-head>span{padding:4px 7px;border-radius:999px;background:#eaf8f3;color:#257a67;font-size:7.5px;font-weight:750}
.v527-cost-chips{display:flex;flex-wrap:wrap;gap:6px}.v527-cost-chips>span{display:flex;align-items:center;gap:6px;padding:6px 8px;border:1px solid #dfe9f1;border-radius:9px;background:#fff}.v527-cost-chips b{font-size:8px;color:#3f5d75}.v527-cost-chips i{font-size:7.8px;color:#1675c5;font-style:normal;font-weight:850}

/* ---------- Plans ---------- */
.v527-commerce-zone .plans-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:11px!important;
  margin:0!important;
}
.v527-commerce-zone .plan-card{
  position:relative!important;
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:360px!important;
  padding:15px!important;
  border:1px solid #d9e6f0!important;
  border-radius:18px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
  color:#173a58!important;
  box-shadow:0 10px 28px rgba(18,62,97,.06)!important;
  overflow:hidden!important;
}
.v527-commerce-zone .plan-card::before{content:"";position:absolute;top:0;right:0;left:0;height:4px;background:linear-gradient(90deg,#5daceb,#58d1b0)}
.v527-commerce-zone .plan-card.featured{border-color:#a9cfee!important;background:linear-gradient(180deg,#f5faff 0%,#fff 38%)!important;box-shadow:0 13px 34px rgba(28,111,183,.11)!important}
.v527-commerce-zone .plan-card.featured::before{background:linear-gradient(90deg,#1e73cb,#2e93e8 52%,#20ae89)}
.v527-plan-top{display:flex;align-items:center;gap:9px;min-height:42px;margin-bottom:10px}.v527-plan-icon{width:39px;height:39px;display:grid;place-items:center;flex:0 0 auto;border-radius:12px;background:#eaf5ff;color:#176db9;font-size:9px;font-weight:950;letter-spacing:.03em}.featured .v527-plan-icon{background:linear-gradient(145deg,#1b76cb,#229fbe);color:#fff}.v527-plan-audience{display:block;color:#8092a2;font-size:7.5px;font-weight:800}.v527-plan-top h3{margin:2px 0 0!important;font-size:13px!important;color:#123654!important}.v527-plan-tag{margin-inline-start:auto;padding:4px 7px;border-radius:999px;background:#e7f7f2;color:#148468;font-size:7.2px;font-weight:900;white-space:nowrap}
.v527-commerce-zone .plan-price{margin:4px 0 2px!important;color:#0e416c!important;font-size:19px!important;font-weight:950!important;line-height:1.25!important}.v527-commerce-zone .featured .plan-price{color:#176fbd!important}.v527-price-note{min-height:29px;color:#7d90a2;font-size:7.8px;line-height:1.55}
.v527-plan-benefits{list-style:none;margin:10px 0 12px;padding:0;display:grid;gap:8px}.v527-plan-benefits li{display:flex;align-items:flex-start;gap:7px;color:#3e5a72;font-size:8.6px;line-height:1.5}.v527-plan-benefits li span{width:18px;height:18px;display:grid;place-items:center;flex:0 0 auto;border-radius:7px;background:#e9f8f3;color:#138769;font-size:9px;font-weight:900}
.v527-commerce-zone .plan-meta{display:grid!important;gap:4px!important;margin-top:auto!important;padding:9px 0 10px!important;border-top:1px solid #e7eef4!important;color:#7e91a2!important;font-size:7.7px!important;line-height:1.5!important}.v527-commerce-zone .plan-meta span{display:block}
.v527-commerce-zone .plan-action{width:100%!important;min-height:40px!important;border:0!important;border-radius:11px!important;background:linear-gradient(135deg,#237ed5,#1569bd)!important;color:#fff!important;font-size:9px!important;font-weight:850!important;box-shadow:0 8px 18px rgba(25,111,190,.17)!important}.v527-commerce-zone .featured .plan-action{background:linear-gradient(135deg,#176dc1,#179b89)!important}.v527-commerce-zone .plan-action:disabled{background:#edf3f8!important;color:#8396a8!important;box-shadow:none!important;cursor:not-allowed!important;opacity:1!important}

.v527-commerce-zone .payment-order{margin-top:11px!important;padding:10px 12px!important;border:1px solid #dce7f0!important;border-radius:12px!important;background:#f9fbfd!important;color:#536e84!important;font-size:8.3px!important;line-height:1.65!important}
.v527-commerce-zone .commerce-note{display:flex!important;align-items:flex-start!important;gap:10px!important;margin-top:12px!important;padding:11px 12px!important;border:1px solid #cde7df!important;border-radius:13px!important;background:linear-gradient(135deg,#effaf6,#fafffd)!important;color:#4c7569!important;font-size:8.2px!important;line-height:1.65!important}.v527-commerce-zone .commerce-note::before{content:"✓";width:24px;height:24px;display:grid;place-items:center;flex:0 0 auto;border-radius:8px;background:#dff5ed;color:#16886d;font-size:11px;font-weight:900}.v527-commerce-zone .commerce-note b{display:block;color:#176e59;font-size:9px}.v527-commerce-zone .commerce-note span{display:block;margin-top:2px}

/* Logged-in profile refinements */
.v527-profile-card details{margin-top:11px;padding:10px;border:1px solid #e0eaf2;border-radius:11px;background:#fafcfe}.v527-profile-card details summary{cursor:pointer;color:#2d5879;font-size:9px;font-weight:800}.v527-profile-card #lastLoginInfo{margin:9px 0 0;padding:8px 10px;border-radius:9px;background:#f5f9fc;color:#73889a}

/* ---------- Tablet ---------- */
@media(max-width:980px){
  .v527-account-layout{grid-template-columns:1fr;padding:16px 18px 20px}.v527-account-trust{padding:13px 18px 0}.v527-commerce-zone .plan-card{min-height:330px!important}
}

/* ---------- Mobile ---------- */
@media(max-width:620px){
  .v527-account-overlay{padding:0!important;align-items:stretch!important;justify-content:stretch!important;background:#f3f8fc!important;backdrop-filter:none!important}
  .v527-account-panel{
    width:100%!important;max-width:none!important;height:100dvh!important;max-height:100dvh!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;background:#f3f8fc!important;
  }
  .v527-account-head{padding:14px 13px 12px;gap:9px}.v527-account-symbol{width:40px;height:40px;border-radius:12px}.v527-account-symbol svg{width:22px;height:22px}.v527-eyebrow{font-size:7.9px}.v527-account-heading h2{font-size:17px!important}.v527-account-heading p{font-size:8px;margin-top:3px;max-width:240px}.v527-account-close{width:38px!important;min-width:38px!important;height:38px!important;padding:0!important;border-radius:11px!important}.v527-account-close b{display:none}.v527-account-close span{font-size:20px}
  .v527-account-trust{grid-template-columns:1fr;gap:6px;padding:9px 10px 0}.v527-account-trust>span{min-height:48px;grid-template-columns:28px 1fr;padding:7px 9px;border-radius:12px}.v527-account-trust i{width:28px;height:28px;border-radius:9px;font-size:12px}.v527-account-trust b{font-size:9px}.v527-account-trust small{font-size:7.4px}
  .v527-account-layout{grid-template-columns:1fr;gap:9px;padding:9px 10px 24px}.v527-auth-zone,.v527-commerce-zone{padding:11px;border-radius:16px;box-shadow:0 8px 20px rgba(18,61,94,.05)}.v527-section-heading{margin-bottom:10px}.v527-section-heading h3{font-size:14px;margin-top:5px}.v527-section-heading p{font-size:8px}.v527-section-heading>span{font-size:7.5px;padding:3px 7px}
  .v527-auth-card{padding:10px!important;border-radius:13px!important}.v527-auth-card .auth-tabs{margin-bottom:10px!important}.v527-auth-card .auth-tab{min-height:36px!important;font-size:9px!important}.v527-login-intro{padding:9px 10px;margin-bottom:10px}.v527-login-intro b{font-size:10px}.v527-login-intro span{font-size:7.6px}.v527-auth-card .auth-grid{grid-template-columns:1fr!important;gap:8px!important}.v527-auth-card input,.v527-auth-card select{min-height:43px!important}.v527-primary-action{min-height:43px!important}
  .v527-commerce-summary{grid-template-columns:1fr;gap:6px}.v527-status-card,.v527-gateway-card{min-height:70px!important;padding:10px!important}.v527-commerce-zone .commerce-costs{padding:10px!important}.v527-cost-head{display:block}.v527-cost-head>span{display:inline-flex;margin-top:6px}.v527-cost-chips{gap:5px}.v527-cost-chips>span{padding:5px 7px}
  .v527-commerce-zone .plans-grid{grid-template-columns:1fr!important;gap:9px!important}.v527-commerce-zone .plan-card{min-height:0!important;padding:13px!important;border-radius:15px!important}.v527-commerce-zone .plan-price{font-size:17px!important}.v527-plan-benefits{gap:6px;margin:8px 0 10px}.v527-plan-benefits li{font-size:8.2px}.v527-commerce-zone .plan-meta{padding:8px 0!important}
  .v527-auth-card .account-actions{grid-template-columns:1fr!important}
}

@media(max-width:380px){
  .v527-account-heading p{display:none}.v527-account-trust>span:nth-child(3){display:none}.v527-account-layout{padding-left:8px;padding-right:8px}.v527-auth-zone,.v527-commerce-zone{padding:9px}
}
