:root {
  color-scheme: dark;

  --bg: #0b0d10;
  --bg-soft: #11151b;
  --panel: #151a21;
  --panel-2: #1a2029;
  --line: rgba(226, 232, 240, .13);

  --text: #f4f4f5;
  --muted: #a1a1aa;
  --muted-2: #cbd5e1;

  --accent: #b45309;
  --accent-2: #d97706;
  --danger: #dc2626;
  --danger-soft: rgba(127, 29, 29, .28);
  --ok: #16a34a;

  --radius: 18px;
  --shadow: 0 18px 45px rgba(0,0,0,.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Tahoma,
    Arial,
    "Noto Naskh Arabic",
    "Noto Sans Arabic",
    sans-serif;
  background:
    linear-gradient(180deg, #0b0d10 0%, #0f1319 44%, #0b0d10 100%);
  color: var(--text);
}

a {
  color: inherit;
}

header {
  background:
    linear-gradient(180deg, rgba(24, 24, 27, .96), rgba(11, 13, 16, .95));
  border-bottom: 1px solid var(--line);
  padding: 34px 0;
}

.wrap {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.brand {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -.04em;
  color: #f8fafc;
}

.logo::before {
  content: "";
  width: 10px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-2), #7f1d1d);
  display: inline-block;
}

.tag {
  color: var(--muted-2);
  max-width: 820px;
  line-height: 1.9;
  font-size: 16px;
}

.notice {
  color: var(--muted);
  line-height: 1.8;
}

.visit-counter {
  display: inline-flex;
  margin-top: 14px;
  padding: 9px 13px;
  border: 1px solid rgba(217,119,6,.35);
  border-radius: 999px;
  background: rgba(217,119,6,.09);
  color: #fed7aa;
  font-weight: 800;
  font-size: 14px;
}

main {
  padding: 30px 0 60px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.card {
  background: linear-gradient(180deg, rgba(26, 32, 41, .96), rgba(17, 21, 27, .96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h2 {
  margin-top: 0;
  font-size: clamp(24px, 3vw, 36px);
}

label {
  display: block;
  margin: 15px 0 7px;
  color: #d4d4d8;
  font-weight: 700;
}

input,
textarea,
select,
button {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(226,232,240,.14);
  padding: 13px 14px;
  background: #0d1117;
  color: var(--text);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(217,119,6,.45);
  border-color: rgba(217,119,6,.6);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input[type="file"] {
  border-style: dashed;
  background: rgba(255,255,255,.035);
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, #92400e, #b45309);
  border: 0;
  font-weight: 900;
  margin-top: 16px;
  transition: transform .12s ease, opacity .12s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(.5);
}

.error {
  color: #f87171;
}

.status {
  margin-top: 12px;
  color: #86efac;
}

.incident {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.incident-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #121820;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.incident-card:hover {
  transform: translateY(-2px);
  border-color: rgba(217,119,6,.55);
  background: #161d27;
}

.thumb {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
  background: #090b0f;
}

.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 900;
}

.sensitive-thumb {
  background:
    radial-gradient(circle at center, rgba(220,38,38,.22), transparent 52%),
    linear-gradient(135deg, #121820, #1f1517);
  color: #fecaca;
  text-align: center;
}

.sensitive-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.incident-card-body {
  padding: 15px;
}

.incident-card-body h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.5;
}

.incident-card-body p {
  color: var(--muted-2);
  line-height: 1.8;
  margin: 0 0 14px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.detail h1 {
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.35;
  margin: 0 0 14px;
}

.detail-desc {
  color: var(--text);
  line-height: 1.9;
  font-size: 18px;
  white-space: pre-wrap;
}

.detail-meta {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin: 20px 0;
}

.compact-warning {
  border: 1px solid rgba(220,38,38,.34);
  background: linear-gradient(180deg, rgba(127,29,29,.22), rgba(24,24,27,.72));
  border-radius: 18px;
  padding: 16px;
  margin: 20px 0;
}

.warning-badges {
  display: grid;
  grid-template-columns: repeat(4, minmax(95px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.warning-badge {
  min-height: 74px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  font-size: 15px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,.12);
}

.warning-badge.danger {
  background: rgba(127,29,29,.42);
  color: #fecaca;
}

.warning-badge.age {
  background: rgba(180,83,9,.28);
  color: #fed7aa;
}

.warning-badge.health {
  background: rgba(63,63,70,.45);
  color: #e4e4e7;
}

.sensitive-warning h2,
.compact-warning h2 {
  margin: 0 0 10px;
  color: #fecaca;
  font-size: 22px;
}

.sensitive-warning p,
.compact-warning p {
  line-height: 1.9;
  color: #fee2e2;
  margin: 0 0 12px;
}

.warning-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.warning-list li {
  border: 1px solid rgba(239,68,68,.22);
  background: rgba(127,29,29,.18);
  border-radius: 14px;
  padding: 11px;
  line-height: 1.7;
  color: #fecaca;
}

.confirm-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0;
  color: #f4f4f5;
  line-height: 1.8;
  border: 1px solid rgba(226,232,240,.12);
  background: rgba(255,255,255,.035);
  border-radius: 14px;
  padding: 12px;
}

.confirm-box input {
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin-top: 5px;
  accent-color: #b45309;
}

.warning-accepted {
  border-color: rgba(22,163,74,.4);
  background: rgba(20,83,45,.17);
}

.hidden {
  display: none !important;
}

.media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.media img,
.media video {
  width: 100%;
  max-height: 360px;
  border-radius: 16px;
  background: #000;
  object-fit: contain;
}

.media-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: rgba(255,255,255,.035);
}

.detail-media {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.video-stats {
  margin: 10px 0 14px;
  color: #d4d4d8;
  font-weight: 900;
}

.tip-form {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.tip-form textarea {
  min-height: 90px;
}

.tip-status {
  margin-top: 10px;
  color: var(--ok);
}

.privacy-note {
  border: 1px solid rgba(22,163,74,.35);
  background: rgba(20,83,45,.2);
  color: #bbf7d0;
  border-radius: 14px;
  padding: 12px;
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 14px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.admin-actions button,
.admin-actions .mini-link {
  width: auto;
  min-width: 110px;
  padding: 10px 13px;
  margin: 0;
}

.reject {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.mini-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #334155, #475569);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  border: 0;
}

.progress-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.progress-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
}

.progress-name {
  font-size: 13px;
  color: #cbd5e1;
  overflow-wrap: anywhere;
  margin-bottom: 8px;
}

.bar {
  height: 10px;
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  overflow: hidden;
}

.bar > span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #b45309, #d97706);
  transition: width .15s linear;
}

.progress-meta {
  margin-top: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.tips-box {
  margin: 12px 0;
  display: grid;
  gap: 10px;
}

.tip-admin-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  color: #dbeafe;
  line-height: 1.8;
}

@media (max-width: 900px) {
  header {
    padding: 24px 0;
  }

  .wrap {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
    border-radius: 16px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .warning-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warning-badge {
    min-height: 66px;
    font-size: 14px;
  }

  .detail-media,
  .media {
    grid-template-columns: 1fr;
  }

  .media img,
  .media video {
    max-height: none;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-actions button,
  .admin-actions .mini-link {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .wrap {
    width: min(100% - 18px, 1180px);
  }

  header {
    padding: 20px 0;
  }

  main {
    padding: 18px 0 44px;
  }

  .logo {
    font-size: 28px;
  }

  .logo::before {
    height: 30px;
    width: 8px;
  }

  .tag,
  .notice {
    font-size: 14px;
  }

  .card {
    padding: 14px;
  }

  input,
  textarea,
  select,
  button {
    font-size: 15px;
    padding: 12px;
  }

  .warning-badges {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .warning-badge {
    min-height: 58px;
    padding: 8px;
    font-size: 13px;
  }

  .compact-warning {
    padding: 12px;
  }

  .admin-actions {
    grid-template-columns: 1fr;
  }

  .thumb {
    height: 150px;
  }
}

.restricted-media-box {
  border: 1px solid rgba(217,119,6,.35);
  background: rgba(120,53,15,.22);
  color: #fed7aa;
  border-radius: 18px;
  padding: 18px;
  margin: 22px 0;
  line-height: 1.9;
}

.restricted-media-box h2 {
  margin-top: 0;
  color: #fdba74;
}
