/* ===== Pioneer Login — modern theme for site/login, site/userlogin,
   site/forgotpassword, site/ufpassword (CodeIgniter views).
   Self-contained: only Bootstrap (alerts) + Font-Awesome (icons) expected.
   All classes prefixed with plg- to avoid collisions with style.css. ===== */
.plg-shell { min-height: 100vh; display: flex; background: #f4f2fb; font-family: "Segoe UI", Tahoma, "Cairo", "Tajawal", Arial, sans-serif; }
.plg-side {
  position: relative; overflow: hidden; color: #fff; flex: 1.05;
  display: flex; flex-direction: column; gap: 22px; padding: 38px 40px 30px;
  background: linear-gradient(160deg, #1d1550 0%, #3b1f8f 55%, #5b2bd9 100%);
}
.plg-side::before, .plg-side::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px);
  opacity: .5; pointer-events: none;
}
.plg-side::before { width: 380px; height: 380px; background: #8b5cf6; top: -120px; inset-inline-end: -100px; }
.plg-side::after { width: 300px; height: 300px; background: #ff6b9d; bottom: -110px; inset-inline-start: -70px; }
.plg-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.plg-brand img { max-height: 62px; max-width: 230px; object-fit: contain; background: rgba(255,255,255,.94); border-radius: 14px; padding: 6px 14px; }
.plg-brand span { font-weight: 800; font-size: 19px; line-height: 1.5; }
.plg-copy { position: relative; z-index: 1; }
.plg-copy h2 { font-size: 30px; font-weight: 900; line-height: 1.5; margin: 4px 0 10px; color: #fff; }
.plg-copy h2 .grad {
  background: linear-gradient(90deg, #f5b942, #ffb03d, #ff6b9d, #f5b942);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plg-copy p { opacity: .88; margin: 0; max-width: 46ch; font-size: 15px; }
.plg-points { position: relative; z-index: 1; list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; font-size: 14px; }
.plg-points li { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; padding: 10px 14px; }
.plg-points .fa { margin-inline-end: 6px; color: #f5b942; }
.plg-photo { position: relative; z-index: 1; margin: auto 0 0; border-radius: 20px; overflow: hidden; border: 1px solid rgba(255,255,255,.3); min-height: 190px; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.plg-photo .plg-news { width: 100%; background: linear-gradient(transparent, rgba(15,10,45,.92)); padding: 34px 20px 16px; }
.plg-photo .plg-news h3 { margin: 0 0 10px; font-size: 19px; font-weight: 800; color: #fff; }
.plg-news-list { max-height: 190px; overflow-y: auto; padding-inline-end: 6px; }
.plg-news-list h4 { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: #ffe3a3; }
.plg-news-list p { font-size: 13.5px; opacity: .9; margin: 0 0 4px; }
.plg-news-list a.more { color: #f5b942; font-weight: 700; }
.plg-news-list .logdivider { border-top: 1px dashed rgba(255,255,255,.3); margin: 10px 0; }

.plg-main { flex: 1; display: flex; flex-direction: column; padding: 26px clamp(20px, 4vw, 56px) 22px; }
.plg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.plg-back { font-weight: 700; font-size: 14px; color: #4a1fc4; text-decoration: none; }
.plg-back:hover { text-decoration: underline; }
.plg-home { font-size: 13px; color: #6b6685; text-decoration: none; border: 1px solid #ddd6f3; background: #fff; border-radius: 999px; padding: 6px 16px; }
.plg-home:hover { border-color: #6c3df4; color: #4a1fc4; }
.plg-card {
  background: #fff; border: 1px solid #e5e0f7; border-radius: 26px;
  box-shadow: 0 20px 60px -20px rgba(76,29,196,.35);
  padding: clamp(24px, 3.5vw, 38px); margin: auto 0; width: 100%; max-width: 500px; align-self: center;
}
.plg-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; background: #ece4ff; color: #4a1fc4; padding: 7px 16px; border-radius: 999px; }
.plg-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #37d6a4; box-shadow: 0 0 12px #37d6a4; }
.plg-card h1 { margin: 14px 0 6px; font-size: 30px; font-weight: 900; color: #1a1440; }
.plg-sub { color: #6b6685; margin: 0 0 18px; font-size: 14.5px; }
.plg-field { margin-bottom: 14px; }
.plg-field > label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; color: #1a1440; }
.plg-input { position: relative; }
.plg-input .fa { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 14px; color: #8f89b3; pointer-events: none; }
.plg-input input {
  width: 100%; padding: 13px 16px; padding-inline-start: 40px; border-radius: 14px;
  border: 1.5px solid #ddd6f3; font-size: 15px; background: #fafaff; color: #1a1440; transition: .2s;
}
[dir="rtl"] .plg-input input { text-align: right; }
.plg-input input[name="username"], .plg-input input[name="email"], .plg-input input[type="password"] { direction: ltr; text-align: left; }
[dir="rtl"] .plg-input input[name="username"], [dir="rtl"] .plg-input input[name="email"], [dir="rtl"] .plg-input input[type="password"] { text-align: right; }
.plg-input input:focus { outline: none; border-color: #6c3df4; box-shadow: 0 0 0 4px rgba(108,61,244,.15); background: #fff; }
.plg-input input.input-error { border-color: #e05252; box-shadow: 0 0 0 4px rgba(224,82,82,.12); }
.plg-pass input { padding-inline-end: 52px; }
.plg-show {
  position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 8px;
  border: 1px solid #ddd6f3; background: #fff; border-radius: 999px; width: 36px; height: 30px;
  cursor: pointer; color: #4a1fc4; font-size: 15px; line-height: 1;
}
.plg-show:hover { border-color: #6c3df4; }
.plg-caps { display: none; color: #8a5a00; background: #fff3d6; border-radius: 10px; padding: 6px 12px; font-size: 13px; font-weight: 700; margin: 8px 0 0; }
.plg-captcha { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.plg-captcha img { border-radius: 10px; border: 1px solid #ddd6f3; }
.plg-refresh { cursor: pointer; color: #4a1fc4; font-size: 18px; }
.plg-submit {
  width: 100%; border: none; cursor: pointer; font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(135deg, #6c3df4, #4a1fc4); padding: 14px; border-radius: 999px;
  box-shadow: 0 12px 28px -10px rgba(108,61,244,.7); transition: .25s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.plg-submit:hover:not(:disabled) { transform: translateY(-2px); }
.plg-submit:disabled { opacity: .7; cursor: not-allowed; }
.plg-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: plg-spin .8s linear infinite; }
.plg-submit.loading .plg-spinner { display: inline-block; }
@keyframes plg-spin { to { transform: rotate(360deg); } }
.plg-alt { text-align: center; margin: 14px 0 0; font-size: 14px; }
.plg-alt a { color: #4a1fc4; font-weight: 700; }
.plg-secure { font-size: 12.5px; color: #8f89b3; margin: 14px 0 0; text-align: center; }
.plg-radio { display: flex; gap: 18px; margin-bottom: 14px; font-size: 14.5px; font-weight: 600; color: #1a1440; }
.plg-radio label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.plg-radio input { width: 17px; height: 17px; accent-color: #6c3df4; }
.plg-foot { text-align: center; font-size: 12.5px; color: #8f89b3; margin: 20px 0 0; }
.plg-card .alert { border-radius: 12px; font-size: 14px; }

/* ===== Portal switcher v2: joined control + gradient tiles + here-check + hint ===== */
.plg-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: #f1edff; border: 1px solid #e5e0f7; border-radius: 18px; padding: 5px;
}
.plg-portal { border-radius: 13px; background: transparent; border-color: transparent; }
.plg-portal:hover, .plg-portal:focus { border-color: transparent; background: rgba(255,255,255,.7); transform: none; }
.plg-portal.active { background: linear-gradient(135deg, #f6f2ff, #e9dfff); border-color: #6c3df4; }
.plg-ptile {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-size: 18px; color: #fff; flex: none; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4);
}
.plg-ptile.staff { background: linear-gradient(135deg, #4c1d95, #7c3aed); }
.plg-ptile.user { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.plg-here {
  display: none; width: 20px; height: 20px; border-radius: 50%; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; background: #37d6a4; flex: none;
  margin-inline-start: auto;
}
.plg-portal.active .plg-here { display: inline-grid; }
.plg-hint { font-size: 13px; color: #6b6685; margin: 8px 4px 0; min-height: 20px; }
.plg-portal { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: #1a1440; transition: .2s; }
.plg-portal-ic { font-size: 24px; line-height: 1; }
.plg-portal b { display: block; font-size: 13.5px; }
.plg-portal small { display: block; font-size: 12px; color: #6b6685; }

/* ===== E-learning side variant (student/parent portal) ===== */
.plg-side-elearn { background: linear-gradient(165deg, #0a1650 0%, #3b1f8f 55%, #0369a1 130%); }
.plg-side-elearn::before { background: #22d3ee; }
.plg-side-elearn::after { background: #f5b942; }
.plg-live {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.3);
  font-size: 13px; font-weight: 700; border-radius: 999px; padding: 7px 16px; width: fit-content;
}
.plg-live .rec { width: 10px; height: 10px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 12px #ff4d4d; animation: plg-blink 1.4s infinite; }
@keyframes plg-blink { 50% { opacity: .25; } }
.plg-feats { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.plg-feat {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24);
  border-radius: 16px; padding: 12px 12px; font-size: 13.5px; font-weight: 600;
  animation: plg-float 5s ease-in-out infinite;
}
.plg-feat:nth-child(2) { animation-delay: -1.2s; }
.plg-feat:nth-child(3) { animation-delay: -2.4s; }
.plg-feat:nth-child(4) { animation-delay: -3.6s; }
.plg-feat span { display: block; font-size: 22px; margin-bottom: 4px; }
@keyframes plg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ===== Magical news panel ===== */
.plg-photo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 12% 22%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 32% 68%, #ffe3a3, transparent),
    radial-gradient(2px 2px at 52% 18%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 68% 42%, #fff, transparent),
    radial-gradient(2px 2px at 82% 72%, #ffe3a3, transparent),
    radial-gradient(1.5px 1.5px at 90% 25%, #fff, transparent),
    radial-gradient(2px 2px at 44% 88%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 8% 78%, #fff, transparent);
  animation: plg-twinkle 3.2s ease-in-out infinite alternate;
}
@keyframes plg-twinkle { from { opacity: .3; } to { opacity: .95; } }
.plg-news { position: relative; z-index: 1; width: 100%; background: linear-gradient(transparent 0%, rgba(15,10,45,.88) 38%); padding: 44px 20px 16px; }
.plg-news-head { margin-bottom: 12px; }
.plg-news-badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800;
  color: #1a1440; background: linear-gradient(135deg, #f5b942, #ffd97a);
  border-radius: 999px; padding: 5px 14px; box-shadow: 0 6px 18px -6px rgba(245,185,66,.8);
}
.plg-news-head h3 {
  margin: 8px 0 0; font-size: 21px; font-weight: 900; color: #fff; line-height: 1.5;
  background: linear-gradient(90deg, #fff, #ffe3a3, #fff); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
}
.plg-news-list { display: grid; gap: 10px; max-height: 240px; overflow-y: auto; padding-inline-end: 4px; }
.plg-news-list::-webkit-scrollbar { width: 6px; }
.plg-news-list::-webkit-scrollbar-thumb { background: rgba(245,185,66,.6); border-radius: 999px; }
.plg-ncard {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px; padding: 12px 14px; backdrop-filter: blur(6px);
  transition: .25s;
}
.plg-ncard:hover { transform: translateY(-3px); border-color: rgba(245,185,66,.7); box-shadow: 0 12px 28px -12px rgba(0,0,0,.6); }
.plg-ncard.feat { background: rgba(245,185,66,.14); border-color: rgba(245,185,66,.55); }
.plg-nicon {
  flex: none; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #6c3df4, #ff6b9d); box-shadow: 0 6px 16px -6px rgba(0,0,0,.5);
}
.plg-ncard.feat .plg-nicon { background: linear-gradient(135deg, #f5b942, #ff8a3d); }
.plg-ncard h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 800; color: #fff; line-height: 1.6; }
.plg-nmeta { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #ffe3a3; opacity: .92; margin: 0 0 4px; }
.plg-ncard p { font-size: 13px; opacity: .88; margin: 0; color: #f1edff; line-height: 1.7; }
.plg-ncard a.more {
  display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 800; color: #1a1440;
  background: linear-gradient(135deg, #f5b942, #ffd97a); border-radius: 999px; padding: 3px 14px; text-decoration: none;
}
.plg-ncard a.more:hover { filter: brightness(1.07); }
.plg-quote {
  background: rgba(255,255,255,.1); border: 1px dashed rgba(245,185,66,.6);
  border-radius: 16px; padding: 16px 18px; backdrop-filter: blur(6px);
}
.plg-quote > span { font-size: 24px; }
.plg-quote p { font-size: 15px; font-style: italic; color: #fff; margin: 6px 0; line-height: 1.9; }
.plg-quote small { color: #ffe3a3; font-weight: 700; }

/* ===== Theme: STAFF NIGHT (midnight command) ===== */
.plg-side-night { background: linear-gradient(165deg, #060a24 0%, #141a3d 48%, #2b1a5e 100%); }
.plg-side-night::before { background: #4c1d95; opacity: .7; }
.plg-side-night::after { background: #f5b942; opacity: .28; }
.plg-night .plg-card { border-top: 4px solid #f5b942; }
.plg-night .plg-submit { background: linear-gradient(135deg, #4c1d95, #12103a); box-shadow: 0 12px 28px -10px rgba(20, 10, 60, .8); }
.plg-night .plg-field input:focus { border-color: #8b7cf6; box-shadow: 0 0 0 4px rgba(245, 185, 66, .18); }
.plg-night .plg-badge { background: linear-gradient(135deg, #f5b942, #ffd97a); color: #1e1b4b; }
.plg-night .plg-badge .dot { background: #1e1b4b; box-shadow: 0 0 12px #1e1b4b; }

/* ===== Theme: STUDENT DAY (daylight learning) ===== */
.plg-side-day { background: linear-gradient(165deg, #e0f2fe 0%, #bae6fd 42%, #fef9c3 125%); }
.plg-side-day::before {
  background: radial-gradient(circle, #fde047 0%, #fde047 34%, rgba(253, 224, 71, 0) 70%);
  width: 280px; height: 280px; top: -70px; inset-inline-end: -60px; opacity: .9; filter: none;
}
.plg-side-day::after {
  background: #fff; opacity: .55; filter: blur(60px);
  width: 340px; height: 130px; border-radius: 999px; bottom: 8%; inset-inline-start: -60px;
}
.plg-side-day .plg-brand span, .plg-side-day .plg-copy h2, .plg-side-day .plg-copy p { color: #0c1a3d; }
.plg-side-day .plg-points li { background: rgba(255, 255, 255, .75); border-color: rgba(12, 26, 61, .12); color: #0c1a3d; }
.plg-side-day .plg-live { background: rgba(12, 26, 61, .85); }
.plg-side-day .plg-feat { background: rgba(255, 255, 255, .8); border-color: rgba(12, 26, 61, .12); color: #0c1a3d; }
.plg-day .plg-card { border-top: 4px solid #38bdf8; }
.plg-day .plg-submit { background: linear-gradient(135deg, #0284c7, #0369a1); box-shadow: 0 12px 28px -10px rgba(2, 132, 199, .7); }
.plg-day .plg-field input:focus { border-color: #0284c7; box-shadow: 0 0 0 4px rgba(56, 189, 248, .2); }
.plg-day .plg-badge { background: #e0f2fe; color: #0369a1; }
.plg-day .plg-badge .dot { background: #0284c7; box-shadow: 0 0 12px #0284c7; }

/* ===== News full magic: entrance + shine + calendar + NEW ===== */
.plg-ncard { position: relative; overflow: hidden; animation: plgCardIn .55s cubic-bezier(.2, .8, .2, 1) both; animation-delay: var(--d, 0s); }
@keyframes plgCardIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.plg-ncard::after {
  content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: -80%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
  opacity: 0; pointer-events: none;
}
.plg-ncard:hover::after { opacity: 1; animation: plgShine 1s ease; }
@keyframes plgShine { from { inset-inline-start: -80%; } to { inset-inline-start: 130%; } }
.plg-cal { display: inline-flex; align-items: center; gap: 7px; }
.plg-cal b {
  background: linear-gradient(135deg, #f5b942, #ffd97a); color: #1e1b4b;
  border-radius: 8px; padding: 1px 9px; font-size: 13px; box-shadow: 0 4px 12px -4px rgba(245, 185, 66, .7);
}
.plg-cal small { color: #ffe3a3; font-weight: 700; font-size: 12px; }
.plg-new {
  display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 800;
  color: #1e1b4b; background: linear-gradient(135deg, #37d6a4, #a7f3d0);
  border-radius: 999px; padding: 2px 10px; margin-inline-start: 6px;
  animation: plgBlink 1.6s ease-in-out infinite;
}
@keyframes plgBlink { 50% { opacity: .55; } }

/* ===== Login language switcher (AR/EN pills) ===== */
.plg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plg-lang { display: flex; background: #f1edff; border: 1px solid #e5e0f7; border-radius: 999px; padding: 3px; gap: 2px; }
.plg-lang a { font-size: 12.5px; font-weight: 700; color: #5b5675; text-decoration: none; padding: 5px 14px; border-radius: 999px; transition: .2s; }
.plg-lang a:hover { color: #4c1d95; }
.plg-lang a.on { background: #fff; color: #1e1b4b; box-shadow: 0 2px 8px rgba(26, 20, 64, .15); }

@media (max-width: 920px) {
  .plg-shell { flex-direction: column; }
  .plg-side { padding: 30px 24px; }
  .plg-photo { display: none; }
  .plg-main { padding: 20px 16px; }
  .plg-card { max-width: 100%; }
  .plg-feats { grid-template-columns: 1fr 1fr; }
  .plg-switch { grid-template-columns: 1fr; }
}
