/* OUTLAW Admin — sky blue cinematic UI */

:root {
  --ink: #041019;
  --ink-2: #071928;
  --panel: rgba(8, 29, 42, 0.88);
  --panel-2: rgba(10, 38, 56, 0.92);
  --text: #e9fbff;
  --muted: #8eb9c8;
  --gold: #39bdc8;
  --gold-bright: #74dce4;
  --gold-dim: #1f7f88;
  --copper: #2f9faa;
  --ember: #227983;
  --danger: #d45678;
  --border: rgba(57, 189, 200, 0.24);
  --border-strong: rgba(116, 220, 228, 0.4);
  --glow-gold: rgba(116, 220, 228, 0.28);
  --font-ar: "Cairo", "Segoe UI", sans-serif;
  --font-display: "Cairo", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-ar);
  color: var(--text);
  background: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

/* ——— Ambient scene ——— */
.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.scene-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: saturate(0.9) contrast(1.05) brightness(0.55);
}

.scene-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orb-float 18s var(--ease-out) infinite;
}

.scene-orb--1 {
  width: min(55vw, 420px);
  height: min(55vw, 420px);
  background: radial-gradient(circle, rgba(57, 189, 200, 0.35) 0%, transparent 70%);
  top: -12%;
  right: -8%;
  animation-delay: 0s;
}

.scene-orb--2 {
  width: min(45vw, 360px);
  height: min(45vw, 360px);
  background: radial-gradient(circle, rgba(95, 205, 219, 0.26) 0%, transparent 70%);
  bottom: -15%;
  left: -10%;
  animation-delay: -6s;
}

.scene-orb--3 {
  width: min(35vw, 280px);
  height: min(35vw, 280px);
  background: radial-gradient(circle, rgba(44, 154, 168, 0.22) 0%, transparent 70%);
  top: 40%;
  left: 35%;
  animation-delay: -12s;
}

@keyframes orb-float {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(-3%, 4%) scale(1.05);
  }
  66% {
    transform: translate(4%, -2%) scale(0.96);
  }
}

.scene-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 85% 70% at 50% 45%, transparent 0%, rgba(0, 0, 0, 0.75) 100%);
}

.scene-noise {
  position: absolute;
  inset: -40%;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 0.35s steps(2) infinite;
}

@keyframes noise-shift {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(-2%, 2%);
  }
}

.scene-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.35;
  pointer-events: none;
}

/* ——— Layout ——— */
.app {
  position: relative;
  z-index: 1;
  width: min(1100px, 96%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) 0;
}

.card {
  position: relative;
  background: linear-gradient(165deg, var(--panel) 0%, rgba(12, 10, 8, 0.95) 100%);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(22px, 4vw, 32px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 32px 80px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(57, 189, 200, 0.08);
  backdrop-filter: blur(12px);
  transition:
    transform 0.45s var(--ease-out),
    box-shadow 0.45s var(--ease-out),
    opacity 0.45s var(--ease-out);
}

body.ui-ready .login-card {
  animation: card-enter 0.85s var(--ease-out) both;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.dashboard-card.dashboard-enter {
  animation: dash-enter 0.6s var(--ease-out) both;
}

@keyframes dash-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Login stage */
.login-stage {
  max-width: 440px;
  margin: clamp(40px, 12vh, 100px) auto;
  overflow: hidden;
}

.login-frame {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(57, 189, 200, 0.14);
  border-radius: var(--radius);
}

.login-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: var(--gold);
  border-style: solid;
  opacity: 0.55;
}

.login-corner--tl {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
  border-radius: 0 6px 0 0;
}
.login-corner--tr {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
  border-radius: 6px 0 0 0;
}
.login-corner--bl {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 6px 0;
}
.login-corner--br {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 6px;
}

.login-brand-block {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 0 24px var(--glow-gold);
}

.brand--hero {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--gold-dim), var(--gold-bright), var(--copper), var(--gold-dim));
  padding: 3px;
  animation: brand-pulse 4s ease-in-out infinite;
}

@keyframes brand-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(116, 220, 228, 0.3);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(116, 220, 228, 0);
  }
}

.brand-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--ink);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.brand.small {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 0.95rem;
  background: linear-gradient(145deg, rgba(57, 189, 200, 0.24), rgba(10, 38, 56, 0.9));
  border: 1px solid var(--border-strong);
  padding: 0;
  display: grid;
  place-items: center;
}

.brand.small .brand-inner {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: transparent;
}

.brand--dash .brand-inner {
  border-radius: 10px;
  background: rgba(12, 10, 8, 0.9);
}

.login-tagline-en {
  font-family: var(--font-display);
  font-size: 0.68rem;
  letter-spacing: 0.42em;
  color: var(--gold);
  margin: 0 0 0.35rem;
  opacity: 0.9;
  text-transform: uppercase;
}

.login-title {
  font-family: var(--font-ar);
  font-size: clamp(2rem, 6vw, 2.6rem);
  font-weight: 700;
  margin: 0;
  background: linear-gradient(180deg, #e8fbff 0%, var(--gold-bright) 45%, var(--copper) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(57, 189, 200, 0.35));
}

.login-subtitle {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
}

.subtitle,
.hint {
  color: var(--muted);
}

.login-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
}

.mode-btn {
  border: 1px solid var(--border);
  background: rgba(8, 30, 45, 0.75);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: none;
}

.mode-btn.active {
  background: linear-gradient(135deg, #218891 0%, var(--gold) 45%, var(--gold-bright) 100%);
  color: #04222c;
  border-color: rgba(116, 220, 228, 0.55);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.dash-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.dash-sub {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.admin-brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pill-admin {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  padding: 6px 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(57, 189, 200, 0.35), rgba(30, 102, 110, 0.5));
  border: 1px solid var(--border-strong);
  color: var(--gold-bright);
}

/* Forms */
.form,
.grid {
  display: grid;
  gap: 14px;
}

body.ui-ready .form--login .field-group {
  animation: field-rise 0.55s var(--ease-out) both;
}

body.ui-ready .form--login .field-group:nth-child(1) {
  animation-delay: 0.12s;
}
body.ui-ready .form--login .field-group:nth-child(2) {
  animation-delay: 0.22s;
}
body.ui-ready .form--login .btn-primary {
  animation: field-rise 0.55s var(--ease-out) 0.32s both;
}

@keyframes field-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.field-group {
  display: grid;
  gap: 6px;
}

label {
  font-size: 0.88rem;
  color: #c4b5a5;
  font-weight: 500;
}

input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  outline: none;
  font-family: inherit;
  transition:
    border-color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    transform 0.2s var(--ease-out);
}

input::placeholder {
  color: rgba(168, 152, 136, 0.45);
}

input:hover {
  border-color: rgba(116, 220, 228, 0.34);
}

input:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(116, 220, 228, 0.16);
  transform: translateY(-1px);
}

/* Buttons */
button {
  position: relative;
  border: none;
  font-family: inherit;
  cursor: pointer;
  font-weight: 600;
  border-radius: 11px;
  overflow: hidden;
  transition:
    transform 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    filter 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #218891 0%, var(--gold) 40%, var(--gold-bright) 100%);
  color: #04222c;
  padding: 14px 18px;
  box-shadow:
    0 4px 20px rgba(57, 189, 200, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 28px rgba(116, 220, 228, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-glow:active {
  transform: translateY(0);
}

.btn-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 45%,
    transparent 55%
  );
  transform: translateX(-100%);
  animation: btn-shine 3.5s ease-in-out infinite;
}

@keyframes btn-shine {
  0%,
  60% {
    transform: translateX(-100%);
  }
  75% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.btn-compact {
  padding: 11px 16px;
  font-size: 0.92rem;
}

button.secondary {
  background: linear-gradient(180deg, rgba(12, 43, 62, 0.95), rgba(8, 30, 45, 0.98));
  color: var(--text);
  border: 1px solid var(--border);
  padding: 11px 14px;
  box-shadow: none;
}

button.secondary:hover {
  border-color: var(--border-strong);
  background: rgba(16, 55, 78, 0.95);
  transform: translateY(-1px);
}

button.danger {
  background: linear-gradient(180deg, #a03838, #7a2a2a);
  color: #ffe8e8;
  border: 1px solid rgba(255, 120, 120, 0.25);
  padding: 11px 14px;
}

button.danger:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-iconish {
  font-size: 0.85rem;
}

.error {
  color: #ff9d9d;
  min-height: 22px;
  font-size: 0.88rem;
}

.hidden {
  display: none !important;
}

/* Dashboard */
.dashboard-card {
  overflow: hidden;
}

.dashboard-glow {
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 45%;
  background: radial-gradient(ellipse, rgba(57, 189, 200, 0.14) 0%, transparent 70%);
  pointer-events: none;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.header-actions,
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.panel-lift {
  transition: transform 0.35s var(--ease-out);
}

.panel-lift:hover {
  transform: translateY(-2px);
}

.sheet-config {
  margin-top: 18px;
  padding: 18px;
  background: linear-gradient(155deg, rgba(9, 36, 53, 0.78), rgba(7, 25, 38, 0.88));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold-bright);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-title-icon {
  filter: grayscale(0.2);
}

.sheet-gid-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 420px;
}

.sheet-config .field-group--gid {
  width: 100%;
  margin-bottom: 0;
}

.sheet-save-btn {
  margin-top: 22px;
}

.sheet-config .hint code {
  font-family: ui-monospace, "Cairo", monospace;
  font-size: 0.85em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(57, 189, 200, 0.12);
  border: 1px solid rgba(57, 189, 200, 0.25);
  color: var(--gold-bright);
}

.table-panel {
  margin-top: 22px;
}

.member-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.summary-card {
  background: rgba(6, 31, 46, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.summary-label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 6px;
}

.summary-card strong {
  color: #d8f8ff;
  font-size: 1rem;
}

.member-metrics-list {
  display: grid;
  gap: 10px;
}

.member-week-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.week-tab {
  border: 1px solid var(--border);
  background: rgba(8, 37, 56, 0.72);
  color: #bfeff4;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.82rem;
  box-shadow: none;
}

.week-tab.active {
  background: linear-gradient(135deg, #2cb8c4, #9cecf3);
  color: #05313f;
  border-color: rgba(116, 220, 228, 0.65);
}

.member-week-points-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.member-week-details {
  display: grid;
  gap: 12px;
}

.member-rank-board {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 33, 48, 0.72), rgba(6, 24, 36, 0.9));
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(57, 189, 200, 0.11);
}

.rank-row:last-child {
  border-bottom: none;
}

.rank-row.is-me {
  background: rgba(57, 189, 200, 0.12);
}

.rank-points {
  color: #defaff;
  font-size: 1.18rem;
}

.rank-name {
  color: #c9edf8;
  font-weight: 600;
}

.rank-pos {
  color: #7adce8;
  text-align: left;
  font-weight: 700;
}

.member-rank-meta {
  margin-top: 10px;
}

.hint--tight {
  margin-top: 8px;
  margin-bottom: 4px;
}

.sheet-notes-row {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 160px);
  gap: 12px;
  margin-top: 10px;
  align-items: end;
}

@media (max-width: 640px) {
  .sheet-notes-row {
    grid-template-columns: 1fr;
  }
}

.member-notes-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.member-notes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.member-note-card {
  border: 1px solid rgba(57, 189, 200, 0.2);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(145deg, rgba(12, 40, 58, 0.75), rgba(8, 28, 42, 0.88));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.member-note-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-bottom: 10px;
}

.member-note-date {
  font-size: 0.82rem;
  color: #9ee7f0;
  font-weight: 600;
}

.member-note-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 107, 107, 0.18);
  border: 1px solid rgba(255, 140, 140, 0.35);
  color: #ffc9c9;
}

.member-note-card__body {
  margin: 0;
  line-height: 1.65;
  color: #dff6ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.member-note-card__foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.note-object-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 200, 120, 0.35);
  background: rgba(255, 180, 72, 0.12);
  color: #ffe5b4;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.note-object-btn:hover {
  background: rgba(255, 180, 72, 0.22);
  border-color: rgba(255, 210, 140, 0.5);
}

.note-object-btn__icon {
  font-size: 1.1rem;
}

.objection-dialog {
  max-width: min(520px, 94vw);
  width: 100%;
  border: 1px solid rgba(57, 189, 200, 0.35);
  border-radius: 16px;
  padding: 0;
  background: linear-gradient(180deg, #0a2434, #061a28);
  color: #dff6ff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.objection-dialog::backdrop {
  background: rgba(2, 12, 20, 0.72);
  backdrop-filter: blur(4px);
}

.objection-form {
  padding: 22px 22px 18px;
}

.objection-dialog-title {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.objection-preview {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--border);
  max-height: 200px;
  overflow: auto;
}

.objection-preview__meta {
  font-size: 0.82rem;
  color: #9ee7f0;
  margin-bottom: 8px;
}

.objection-preview__text {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.objection-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}

.admin-objections-panel {
  margin-top: 16px;
}

.admin-objections-toolbar {
  margin: 10px 0 12px;
}

.admin-objections-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-inline-end: 4px;
}

.admin-objection-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(6, 28, 42, 0.65);
}

.admin-objection-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.admin-objection-card__meta strong {
  color: #9ee7f0;
}

.admin-objection-card__time {
  font-size: 0.78rem;
  color: rgba(200, 230, 240, 0.55);
}

.admin-objection-card__excerpt,
.admin-objection-card__meta-line {
  font-size: 0.86rem;
  margin: 6px 0;
}

.admin-objection-card__message {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.week-section {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: rgba(6, 31, 46, 0.52);
}

.week-section-head {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.week-section-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.week-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.week-metric-card {
  border: 1px solid var(--border);
  background: rgba(10, 39, 56, 0.72);
  border-radius: 12px;
  padding: 12px;
}

.week-metric-label {
  display: block;
  color: #9ecedc;
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.week-metric-value {
  color: #e3f9ff;
  font-size: 1.45rem;
  line-height: 1;
}

.week-metric-card--ok .week-metric-value {
  color: #6cf0b7;
}

.week-metric-card--muted .week-metric-value {
  color: #92b7c7;
  font-size: 1.05rem;
}

.week-section--support {
  border-color: rgba(252, 189, 78, 0.45);
}

.week-section--support .week-section-chip {
  background: rgba(252, 189, 78, 0.2);
  border-color: rgba(252, 189, 78, 0.45);
  color: #ffd896;
}

.week-section--tickets {
  border-color: rgba(67, 226, 155, 0.42);
}

.week-section--tickets .week-section-chip {
  background: rgba(67, 226, 155, 0.18);
  border-color: rgba(67, 226, 155, 0.42);
  color: #abf2d2;
}

.week-section--activation {
  border-color: rgba(150, 201, 232, 0.42);
}

.week-section--activation .week-section-chip {
  background: rgba(150, 201, 232, 0.2);
  border-color: rgba(150, 201, 232, 0.42);
  color: #d2ecfb;
}

.week-section--report {
  border-color: rgba(61, 171, 255, 0.45);
}

.week-section--report .week-section-chip {
  background: rgba(61, 171, 255, 0.2);
  border-color: rgba(61, 171, 255, 0.45);
  color: #b9e0ff;
}

.metric-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(8, 37, 56, 0.65);
}

.metric-row.compact {
  padding: 10px;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.metric-label {
  color: #d9f7ff;
  font-size: 0.9rem;
}

.metric-value {
  color: var(--gold-bright);
  font-size: 0.92rem;
}

.metric-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(57, 189, 200, 0.15);
  overflow: hidden;
}

.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #45d0db, #9feff6);
}

.rank-groups-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 14px;
  background: linear-gradient(180deg, rgba(8, 33, 48, 0.9), rgba(5, 20, 31, 0.95));
  overflow: hidden;
}

.list-head {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
  background: rgba(57, 189, 200, 0.1);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  text-transform: uppercase;
}

#rankGroups {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.rank-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10, 40, 58, 0.66), rgba(7, 27, 42, 0.86));
  overflow: hidden;
  transition:
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.rank-section:hover {
  border-color: rgba(116, 220, 228, 0.34);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.rank-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(57, 189, 200, 0.09);
}

.rank-title strong {
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  font-family: var(--font-display);
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* نفس لون الخلية في الشيت (Skilled) */
.badge-skilled {
  background: #d9d2e9;
  border-color: #c4bcda;
  color: #2f2942;
}

.badge-super-trusted {
  background: #415566;
  border-color: #5b6d7d;
  color: #eaf4ff;
}

.badge-trusted {
  background: #9b8f8d;
  border-color: #b2a7a5;
  color: #201717;
}

.badge-trial {
  background: #436464;
  border-color: #5d7d7d;
  color: #e3f3f3;
}

.badge-trial-mod {
  background: #0b5394;
  border-color: #2c6ba4;
  color: #e6f2ff;
}

.badge-senior-mod {
  background: #8993aa;
  border-color: #a4acc0;
  color: #101625;
}

.badge-mod {
  background: #bd568a;
  border-color: #cf79a3;
  color: #fff2fb;
}

.badge-support {
  background: #eaa836;
  border-color: #f0bd67;
  color: #2d2208;
}

.badge-active {
  background: #7a4300;
  border-color: #955b1a;
  color: #ffe6c8;
}

.badge-default {
  background: rgba(28, 92, 120, 0.42);
  border-color: var(--border);
  color: #d2f4ff;
}

.rank-title span {
  font-size: 0.78rem;
  color: var(--muted);
  background: rgba(57, 189, 200, 0.12);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-ar);
}

.member-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(57, 189, 200, 0.1);
  transition: background 0.25s var(--ease-out);
}

.member-row:hover {
  background: rgba(57, 189, 200, 0.06);
}

.member-row:last-child {
  border-bottom: none;
}

.member-name {
  color: #f0e6d8;
  font-weight: 500;
}

.password-cell {
  position: relative;
}

.password-input {
  max-width: 220px;
  padding-left: 40px;
}

.password-visibility-btn {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(57, 189, 200, 0.35);
  background: rgba(8, 44, 63, 0.86);
  color: #9be5ec;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
  display: inline-grid;
  place-items: center;
  box-shadow: none;
}

.password-visibility-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.password-visibility-btn:hover {
  border-color: rgba(116, 220, 228, 0.6);
  background: rgba(12, 58, 82, 0.95);
}

.password-visibility-btn.is-open {
  color: #d7fbff;
}

.empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

.status {
  margin-top: 12px;
  color: var(--gold-bright);
  min-height: 22px;
  font-size: 0.9rem;
}

/* Footer */
.site-foot {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-foot--dash {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.site-foot__link {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-foot__link:hover {
  color: var(--gold-bright);
  text-decoration: underline;
}

.site-foot__sep {
  color: var(--muted);
  opacity: 0.6;
}

.site-foot__muted {
  color: var(--muted);
}

/* Member left section switcher */
#memberView {
  position: relative;
}

#adminView {
  position: relative;
}

.admin-nav-toggle,
.member-nav-toggle {
  position: absolute;
  left: -18px;
  top: 108px;
  z-index: 35;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(57, 189, 200, 0.35);
  background: linear-gradient(160deg, rgba(57, 189, 200, 0.16), rgba(8, 33, 48, 0.92));
  color: #9be8ef;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-nav-toggle {
  top: 104px;
}

.admin-nav-toggle:hover,
.member-nav-toggle:hover {
  transform: translateX(-2px);
  border-color: rgba(57, 189, 200, 0.6);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.admin-nav-toggle[aria-expanded="true"] .admin-nav-toggle-icon,
.member-nav-toggle[aria-expanded="true"] .member-nav-toggle-icon {
  display: inline-block;
  transform: rotate(180deg);
}

.admin-section-nav,
.member-section-nav {
  position: absolute;
  left: 34px;
  top: 96px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 205px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(8, 33, 48, 0.92), rgba(6, 24, 36, 0.97));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.admin-section-nav {
  top: 96px;
}

.admin-section-nav.open,
.member-section-nav.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.admin-section-link,
.member-section-link {
  width: 100%;
  text-align: right;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.admin-section-link:hover,
.member-section-link:hover {
  color: #99e6ed;
  border-color: rgba(57, 189, 200, 0.22);
  background: rgba(57, 189, 200, 0.08);
}

.admin-section-link.active,
.member-section-link.active {
  color: #d8f8fd;
  font-weight: 700;
  border-color: rgba(57, 189, 200, 0.38);
  background: rgba(57, 189, 200, 0.16);
}

/* ——— Reports system (ol-report style, OutLaw theme) ——— */
.table-panel[data-outlaw-reports] {
  padding-top: 1.25rem;
}

.outlaw-reports {
  --reports-accent: #39bdc8;
  --reports-accent-dim: rgba(57, 189, 200, 0.14);
}

.reports-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.reports-refresh {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(8, 33, 48, 0.75);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.reports-refresh:hover:not(:disabled) {
  color: var(--reports-accent);
  border-color: rgba(57, 189, 200, 0.35);
  background: rgba(57, 189, 200, 0.08);
}

.reports-add {
  border-color: rgba(57, 189, 200, 0.35);
  color: #b4edf2;
}

.reports-refresh:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.reports-warn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
  color: rgba(255, 160, 160, 0.95);
  background: rgba(180, 40, 40, 0.12);
  border: 1px solid rgba(255, 100, 100, 0.22);
}

.reports-warn-ic {
  flex-shrink: 0;
  margin-top: 1px;
}

.reports-shell {
  display: grid;
  grid-template-columns: minmax(200px, 240px) 1fr;
  gap: 16px;
  align-items: start;
}

.reports-aside {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 10px;
  background: rgba(6, 24, 36, 0.55);
  max-height: 70vh;
  overflow-y: auto;
}

.reports-sb-lbl {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 0 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reports-sb-lbl::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(57, 189, 200, 0.12);
}

.reports-nav-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reports-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: right;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.reports-nav:hover {
  color: var(--reports-accent);
  background: var(--reports-accent-dim);
  border-color: rgba(57, 189, 200, 0.2);
}

.reports-nav--on {
  color: var(--reports-accent);
  font-weight: 700;
  background: rgba(57, 189, 200, 0.12);
  border-color: rgba(57, 189, 200, 0.25);
}

.reports-nav-ic {
  font-size: 1rem;
  width: 1.35rem;
  text-align: center;
  flex-shrink: 0;
}

.reports-nav-nm {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reports-nav-tg {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid;
  text-transform: uppercase;
  flex-shrink: 0;
}

.reports-tg-r {
  border-color: rgba(255, 100, 100, 0.35);
  color: rgba(255, 170, 170, 0.95);
  background: rgba(200, 60, 60, 0.12);
}

.reports-tg-g {
  border-color: rgba(255, 210, 120, 0.3);
  color: rgba(255, 220, 140, 0.95);
  background: rgba(200, 150, 0, 0.1);
}

.reports-tg-p {
  border-color: rgba(160, 120, 255, 0.35);
  color: rgba(200, 180, 255, 0.95);
  background: rgba(100, 70, 200, 0.12);
}

.reports-main {
  min-width: 0;
}

.reports-bar {
  margin-bottom: 14px;
}

.reports-srch {
  position: relative;
  max-width: 620px;
}

.reports-srch-ic {
  position: absolute;
  inset-inline-end: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--muted);
  pointer-events: none;
  opacity: 0.75;
}

.reports-search {
  width: 100%;
  padding: 10px 14px;
  padding-inline-end: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(8, 33, 48, 0.85);
  color: #e8f4f8;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reports-search:focus {
  border-color: rgba(57, 189, 200, 0.45);
  box-shadow: 0 0 0 3px rgba(57, 189, 200, 0.12);
}

.reports-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reports-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(8, 33, 48, 0.72), rgba(6, 24, 36, 0.88));
  overflow: hidden;
  animation: reportsCardIn 0.28s ease both;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.reports-card:hover {
  border-color: rgba(57, 189, 200, 0.28);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

@keyframes reportsCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reports-card-hdr {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  border-bottom: 1px solid rgba(57, 189, 200, 0.08);
}

.reports-card--shut .reports-card-hdr {
  border-bottom: none;
}

.reports-card--shut .reports-card-body {
  display: none;
}

.reports-c-ic {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(12, 40, 56, 0.9);
  border: 1px solid rgba(57, 189, 200, 0.12);
  flex-shrink: 0;
}

.reports-c-info {
  flex: 1;
  min-width: 0;
}

.reports-c-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #defaff;
  line-height: 1.3;
}

.reports-c-badge {
  font-size: 0.58rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid;
  text-transform: uppercase;
  vertical-align: middle;
  margin-inline-start: 6px;
}

.reports-cb-r {
  border-color: rgba(255, 100, 100, 0.35);
  color: rgba(255, 170, 170, 0.95);
  background: rgba(200, 60, 60, 0.12);
}

.reports-cb-g {
  border-color: rgba(255, 210, 120, 0.3);
  color: rgba(255, 220, 140, 0.95);
  background: rgba(200, 150, 0, 0.1);
}

.reports-cb-p {
  border-color: rgba(160, 120, 255, 0.35);
  color: rgba(200, 180, 255, 0.95);
  background: rgba(100, 70, 200, 0.12);
}

.reports-c-cnt {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.reports-c-arr {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.22);
  transition: transform 0.2s, color 0.2s;
  flex-shrink: 0;
  width: 1.5rem;
  text-align: center;
}

.reports-card--shut .reports-c-arr {
  transform: rotate(-90deg);
}

.reports-card:hover .reports-c-arr {
  color: var(--reports-accent);
}

.reports-row {
  display: grid;
  grid-template-columns: minmax(120px, 170px) 1fr;
  border-top: 1px solid rgba(57, 189, 200, 0.08);
  transition: background 0.12s;
}

.reports-row:hover {
  background: rgba(57, 189, 200, 0.05);
}

.reports-row-l {
  padding: 10px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #b8dce6;
  background: rgba(0, 0, 0, 0.15);
  border-inline-end: 1px solid rgba(57, 189, 200, 0.08);
  line-height: 1.45;
}

.reports-row-v {
  padding: 10px 14px;
  font-size: 0.86rem;
  color: #c9edf8;
  line-height: 1.65;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reports-row-v span {
  flex: 1;
  word-break: break-word;
}

.reports-cpb {
  flex-shrink: 0;
  opacity: 0;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(8, 33, 48, 0.9);
  color: #c9edf8;
  cursor: pointer;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}

.reports-row:hover .reports-cpb {
  opacity: 1;
}

.reports-cpb:hover {
  color: var(--reports-accent);
  border-color: rgba(57, 189, 200, 0.35);
  background: rgba(57, 189, 200, 0.1);
}

.reports-cpb.reports-cpb--flash {
  opacity: 1 !important;
  color: #0a1a22 !important;
  background: linear-gradient(135deg, #5ee0eb, #39bdc8) !important;
  border-color: rgba(57, 189, 200, 0.85) !important;
  animation: reportsCopyFlash 0.7s ease;
}

@keyframes reportsCopyFlash {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(57, 189, 200, 0.55);
  }
  45% {
    transform: scale(1.04);
    box-shadow: 0 0 0 10px rgba(57, 189, 200, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(57, 189, 200, 0);
  }
}

.reports-cpb--edit {
  border-color: rgba(255, 210, 120, 0.35);
  color: rgba(255, 225, 160, 0.95);
}

.reports-cpb--delete {
  border-color: rgba(255, 120, 120, 0.4);
  color: rgba(255, 170, 170, 0.95);
}

.reports-empty,
.reports-loading {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.reports-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.reports-sp {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--reports-accent);
  border-radius: 50%;
  animation: reportsSpin 0.7s linear infinite;
}

@keyframes reportsSpin {
  to {
    transform: rotate(360deg);
  }
}

.reports-toast {
  position: fixed;
  left: 50%;
  bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 14px));
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid rgba(57, 189, 200, 0.45);
  background: linear-gradient(165deg, rgba(12, 52, 62, 0.97), rgba(6, 24, 36, 0.98));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(57, 189, 200, 0.12);
  font-size: 0.88rem;
  font-weight: 700;
  color: #d8f8fd;
  opacity: 0;
  transform: translate(-50%, 18px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.34, 1.45, 0.64, 1);
  max-width: min(92vw, 420px);
  text-align: center;
  line-height: 1.35;
}

.reports-toast--on {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  animation: reportsToastPop 0.5s cubic-bezier(0.34, 1.45, 0.64, 1) both;
}

.reports-toast--fail {
  border-color: rgba(255, 120, 120, 0.45);
  color: #ffd4d4;
  background: linear-gradient(165deg, rgba(50, 18, 22, 0.96), rgba(24, 10, 12, 0.98));
}

.reports-toast-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 800;
  background: rgba(57, 189, 200, 0.2);
  border: 1px solid rgba(57, 189, 200, 0.45);
  color: #b8f5fc;
}

.reports-toast--fail .reports-toast-icon {
  background: rgba(255, 90, 90, 0.18);
  border-color: rgba(255, 140, 140, 0.4);
  color: #ffb4b4;
}

.reports-toast-msg {
  flex: 1;
  min-width: 0;
}

@keyframes reportsToastPop {
  0% {
    opacity: 0;
    transform: translate(-50%, 22px) scale(0.88);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1.03);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@media (max-width: 900px) {
  .reports-shell {
    grid-template-columns: 1fr;
  }

  .reports-aside {
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 10px;
  }

  .reports-sb-lbl {
    width: 100%;
  }

  .reports-nav-wrap {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .reports-nav {
    width: auto;
    flex: 1 1 auto;
    min-width: 140px;
  }
}

@media (max-width: 640px) {
  .reports-row {
    grid-template-columns: 1fr;
  }

  .reports-row-l {
    border-inline-end: none;
    border-bottom: 1px solid rgba(57, 189, 200, 0.08);
  }

  .reports-cpb {
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .admin-nav-toggle,
  .member-nav-toggle {
    left: 8px;
    top: 96px;
  }

  .admin-section-nav,
  .member-section-nav {
    left: 52px;
    right: 8px;
    top: 144px;
    min-width: 0;
  }

  .list-head,
  .member-row {
    grid-template-columns: 1fr;
  }

  .password-input {
    max-width: 100%;
  }

  .admin-header {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions {
    justify-content: flex-start;
  }
}

/* ——— Admin reports modal (إضافة / تعديل / تأكيد) ——— */
body.reports-modal-open {
  overflow: hidden;
}

.reports-modal {
  position: fixed;
  inset: 0;
  z-index: 100100;
  display: grid;
  place-items: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.28s var(--ease-out),
    visibility 0.28s;
}

.reports-modal--open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.reports-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 8, 14, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.reports-modal__dialog {
  position: relative;
  width: min(100%, 480px);
  max-height: min(88vh, 720px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border-strong);
  background: linear-gradient(165deg, rgba(10, 42, 56, 0.97), rgba(6, 22, 34, 0.98));
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(57, 189, 200, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition:
    transform 0.38s var(--ease-out),
    opacity 0.32s var(--ease-out);
}

.reports-modal--open .reports-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.reports-modal__frame {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(57, 189, 200, 0.08);
  background: radial-gradient(120% 80% at 50% -20%, rgba(57, 189, 200, 0.12), transparent 55%);
}

.reports-modal__close {
  position: absolute;
  top: 10px;
  inset-inline-start: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(8, 33, 48, 0.85);
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    color 0.2s,
    border-color 0.2s,
    background 0.2s;
}

.reports-modal__close:hover {
  color: var(--gold-bright);
  border-color: rgba(57, 189, 200, 0.4);
  background: rgba(57, 189, 200, 0.1);
}

.reports-modal__head {
  position: relative;
  z-index: 1;
  padding: 22px 20px 12px;
  text-align: center;
  border-bottom: 1px solid rgba(57, 189, 200, 0.1);
}

.reports-modal__eyebrow {
  margin: 0 0 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(57, 189, 200, 0.75);
}

.reports-modal__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  color: #defaff;
  line-height: 1.35;
}

.reports-modal__sub {
  margin: 10px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.reports-modal__body {
  position: relative;
  z-index: 1;
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.reports-modal label {
  color: #b0dce6;
  font-weight: 600;
}

.reports-modal__field textarea {
  width: 100%;
  resize: vertical;
  min-height: 140px;
  border: 1px solid var(--border);
  background: rgba(6, 26, 38, 0.92);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.55;
  transition:
    border-color 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}

.reports-modal__field textarea:hover {
  border-color: rgba(116, 220, 228, 0.34);
}

.reports-modal__field textarea:focus {
  border-color: var(--gold-bright);
  box-shadow: 0 0 0 3px rgba(116, 220, 228, 0.14);
}

.reports-modal__field input {
  font-size: 0.9rem;
}

.reports-modal__error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffc9c9;
  background: rgba(120, 30, 40, 0.25);
  border: 1px solid rgba(255, 120, 120, 0.35);
}

.reports-modal__message {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #c9edf8;
  text-align: center;
}

.reports-modal__actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(57, 189, 200, 0.1);
}

.reports-modal__actions .secondary {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 12px 16px;
}

.reports-modal__actions .btn-primary {
  flex: 1 1 auto;
  min-width: 140px;
  padding: 12px 18px;
}

.reports-modal__submit--danger {
  background: linear-gradient(135deg, #8b3048 0%, #c94a5c 45%, #e8687a 100%) !important;
  color: #fff8f8 !important;
  box-shadow:
    0 4px 22px rgba(200, 70, 90, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

@media (prefers-reduced-motion: reduce) {
  .reports-modal,
  .reports-modal__dialog {
    transition: none;
  }

  .reports-modal--open .reports-modal__dialog {
    transform: none;
  }
}
