/* Brand-led visuals for the sign-in experience and management dashboard. */
#authScreen {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 12% 18%, rgba(42, 133, 105, .28), transparent 34%),
    radial-gradient(ellipse at 88% 82%, rgba(232, 184, 79, .16), transparent 34%),
    linear-gradient(135deg, #07130f 0%, #101c19 48%, #111a24 100%);
}
#authScreen::before,
#authScreen::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(236, 201, 123, .13);
  border-radius: 50%;
}
#authScreen::before {
  width: min(46vw, 610px);
  aspect-ratio: 1;
  left: -12vw;
  top: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at center, transparent 0 31%, rgba(238, 202, 123, .045) 31.2% 31.6%, transparent 31.8% 48%, rgba(238, 202, 123, .055) 48.2% 48.6%, transparent 48.8%),
    url("/assets/branding/emperator-mark.png") center / 31% no-repeat;
  box-shadow: 0 0 0 46px rgba(255,255,255,.012), 0 0 0 92px rgba(255,255,255,.01);
}
#authScreen::after {
  width: 240px;
  height: 240px;
  right: -120px;
  top: -100px;
  border-color: rgba(54, 192, 139, .16);
  box-shadow: 0 0 0 28px rgba(54,192,139,.025), 0 0 0 56px rgba(54,192,139,.02);
}
#authScreen .auth-card {
  position: relative;
  overflow: hidden;
  width: min(440px, 100%);
  padding: 34px;
  border: 1px solid rgba(221, 194, 133, .24);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(25, 39, 37, .97), rgba(15, 25, 29, .98));
  box-shadow: 0 30px 90px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(18px);
}
#authScreen .auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #2ca77a, #e8b84f 52%, #f1d790);
}
#authScreen .auth-brand { margin-bottom: 28px; }
#authScreen .auth-logo {
  display: block;
  width: min(290px, 86%);
  height: 138px;
  margin: 0 auto 2px;
  object-fit: contain;
  mix-blend-mode: screen;
}
#authScreen .auth-brand span { display: block; margin-top: 2px; color: #d8dfd9; font-size: 13px; }
#authScreen h2 { margin-bottom: 22px; font-size: 21px; }
#authScreen #authForm { display: grid; gap: 3px; }
#authScreen .auth-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 10px 0 13px;
  color: #c0cdc6;
  font-size: 13px;
  font-weight: 600;
}
#authScreen .auth-field input {
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 12px 14px;
  border-color: rgba(205, 222, 211, .16);
  border-radius: 12px;
  background: rgba(7, 15, 14, .62);
  direction: rtl;
  text-align: right;
}
#authScreen .auth-submit {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(110deg, #16724f, #21865f 60%, #31966b);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 10px 26px rgba(31, 139, 96, .25);
}
#authScreen .auth-switch { color: #f0ca70; }
#authScreen .auth-error { color: #ff8790; }

#dashboard > .page-head {
  position: relative;
  overflow: hidden;
  min-height: 138px;
  align-items: center;
  background:
    linear-gradient(105deg, rgba(17, 43, 35, .96), rgba(23, 49, 41, .9) 56%, rgba(35, 51, 57, .92)),
    var(--panel);
  border-color: rgba(232,184,79,.22);
}
#dashboard > .page-head::after {
  content: "";
  position: absolute;
  left: 22%;
  top: 50%;
  width: 190px;
  aspect-ratio: 1;
  transform: translateY(-50%);
  opacity: .14;
  background: url("/assets/branding/emperator-mark.png") center / contain no-repeat;
  filter: grayscale(1) brightness(2.5);
  pointer-events: none;
}
#dashboard > .page-head > * { position: relative; z-index: 1; }
#dashboard > .page-head h1 { color: #f8f5eb; font-size: clamp(22px, 2.4vw, 30px); }
#dashboard > .page-head p { color: #c3d1ca; }
#dashboard .stat-card {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  border-top: 2px solid rgba(54,192,139,.45);
  background: linear-gradient(145deg, var(--panel), var(--panel2));
}
#dashboard .stat-card:nth-child(1) { border-top-color: #e8b84f; }
#dashboard .stat-card:nth-child(2) { border-top-color: #4ea1ff; }
#dashboard .stat-card:nth-child(3) { border-top-color: #36c08b; }
#dashboard .stat-card:nth-child(4) { border-top-color: #ef8a75; }
#dashboard .stat-card::after {
  content: "";
  position: absolute;
  width: 94px;
  height: 94px;
  right: -44px;
  bottom: -53px;
  border-radius: 50%;
  border: 1px solid rgba(232,184,79,.14);
  box-shadow: 0 0 0 12px rgba(232,184,79,.025), 0 0 0 24px rgba(232,184,79,.02);
  pointer-events: none;
}
#dashboard .stat-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(232,184,79,.24);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(232,184,79,.18), rgba(54,192,139,.12));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}
#dashboard .chart .bars {
  position: relative;
  min-height: 190px;
  padding: 15px 12px 0;
  background: repeating-linear-gradient(to bottom, transparent 0 46px, rgba(141,162,151,.12) 47px 48px);
  border-radius: 12px;
}
#dashboard .chart .bars i {
  box-shadow: 0 0 18px rgba(232,184,79,.12);
  transition: filter .2s, transform .2s;
}
#dashboard .chart .bars i:hover { filter: brightness(1.22); transform: scaleX(1.06); }
#dashboard .panel-title h3 { display: flex; align-items: center; gap: 9px; }
#dashboard .panel-title h3::before {
  content: "";
  width: 7px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(#36c08b, #e8b84f);
}
@media (max-width: 800px) {
  #authScreen::before { width: 74vw; left: -35vw; opacity: .55; }
  #authScreen .auth-card { padding: 27px 22px; }
  #dashboard > .page-head::after { left: 4%; width: 110px; opacity: .1; }
  #dashboard .stat-card { min-height: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  #dashboard .chart .bars i { transition: none; }
}
/* Keep the approved E + Persian wordmark compact in the management header. */
.topbar .brand {
  min-width: 112px;
  max-width: 112px;
  flex: 0 0 112px;
  justify-content: center;
}
.topbar .brand-logo {
  display: block;
  width: 92px;
  height: 82px;
  object-fit: contain;
}
@media (max-width: 900px) {
  .topbar .brand { min-width: 82px; max-width: 82px; flex-basis: 82px; }
  .topbar .brand-logo { width: 72px; height: 70px; }
}