@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&family=Cairo:wght@400;600;700;800&display=swap');

:root {
  --bg: #0b1010;
  --bg2: #0e1413;
  
  --card: rgba(18, 27, 25, 0.85); 
  --card2: rgba(18, 27, 25, 0.55);
  --line: #223130;
  --text: #eef6f5;
  --muted: #9ab0ad;
  --accent: #2fd3b8;
  --accent2: #7cffed;
  --danger: #ff5a5f;

  --radius: 18px;
  --radius2: 22px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4); 
}

* { box-sizing: border-box; }
html, body { height: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #223130; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

body {
  margin: 0;
  font-family: "Tajawal", "Cairo", system-ui, -apple-system, sans-serif;
  color: var(--text);
  
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(47, 211, 184, 0.12), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  
  background-attachment: fixed; 
  background-size: cover;
  background-repeat: no-repeat;
  
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; transition: opacity .2s; }
svg { max-width: 100%; height: auto; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 20px; width: 100%; }
main.wrap { flex: 1; }

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 16, 16, 0.8);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px); 
  -webkit-backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

.logo {
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  border: 1px solid rgba(47, 211, 184, 0.3);
  background: rgba(47, 211, 184, 0.08);
  overflow: hidden; flex: 0 0 38px;
}
.logo img { width: 24px; height: 24px; display: block; }

.brand-text { font-weight: 800; letter-spacing: .3px; font-size: 17px; }

.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.nav a {
  color: var(--text); text-decoration: none; opacity: .85;
  padding: 8px 12px; border-radius: 12px; font-weight: 500; font-size: 14px;
  transition: all .2s;
}
.nav a:hover {
  opacity: 1; background: rgba(47, 211, 184, 0.1); border: 1px solid rgba(47, 211, 184, 0.2);
}
.nav .danger { color: var(--danger); }
.nav .danger:hover { background: rgba(255, 90, 95, 0.1); border: 1px solid rgba(255, 90, 95, 0.3); }

@media (max-width: 820px) {
  .topbar-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .nav { justify-content: center; width: 100%; }
  .nav a { flex: 1; text-align: center; }
}

h1, h2, h3 { margin: 0 0 12px; font-weight: 700; }
p { color: var(--muted); line-height: 1.7; margin: 8px 0; }
label { display: block; margin: 12px 0 6px; color: #cfe2df; font-weight: 600; font-size: 14px; }

input, select, textarea {
  width: 100%; padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 18, 17, 0.6);
  color: var(--text); outline: none;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 100px; }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 211, 184, 0.1);
}
.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 0; color: var(--muted); cursor: pointer;
}
.checkbox-row input { width: auto; margin: 0; }

.btn, button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 14px;
  border: 1px solid rgba(47, 211, 184, 0.32);
  background: rgba(47, 211, 184, 0.12);
  color: var(--accent2); font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: all .2s ease;
}
.btn:hover, button:hover {
  background: rgba(47, 211, 184, 0.2);
  border-color: rgba(47, 211, 184, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(47, 211, 184, 0.15);
  color: #fff;
}
.btn.primary {
  background: var(--accent); color: #000; border: none;
}
.btn.primary:hover { background: #25cca0; color: #000; }

.btn.danger {
  background: rgba(255, 90, 95, 0.1);
  border-color: rgba(255, 90, 95, 0.4);
  color: #ffadb0;
}
.btn.danger:hover {
  border-color: var(--danger); background: rgba(255, 90, 95, 0.2); color: #fff;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px); 
  -webkit-backdrop-filter: blur(8px);
}

.hr { height: 1px; background: var(--line); margin: 20px 0; }

.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border: 1px solid var(--line);
  border-radius: 99px; color: var(--muted); font-size: 12px;
  background: rgba(0,0,0,0.2);
}

.notice {
  padding: 14px 16px; border-radius: 16px;
  border: 1px solid rgba(47, 211, 184, 0.3);
  background: rgba(47, 211, 184, 0.08);
  color: #dffaf6; font-size: 14px;
}
.notice.warn {
  border-color: rgba(255, 90, 95, 0.4);
  background: rgba(255, 90, 95, 0.1);
  color: #ffeaea;
}

.muted { color: var(--muted); }
.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #080c0b; border: 1px dashed var(--line);
  padding: 12px; border-radius: 14px; overflow: auto;
  font-size: 13px; color: var(--accent2);
}

.grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; align-items: stretch;
}
.col-12 { grid-column: span 12; }
.col-6 { grid-column: span 6; }
.col-4 { grid-column: span 4; }
@media (max-width: 820px) {
  .col-6, .col-4 { grid-column: span 12; }
}

.kpi { display: flex; gap: 14px; flex-wrap: wrap; }
.kpi .box { flex: 1; min-width: 160px; }

.hero {
  position: relative; padding: 30px;
  border-radius: var(--radius2);
  border: 1px solid rgba(47, 211, 184, 0.2);
  background: linear-gradient(145deg, rgba(18, 27, 25, 0.9), rgba(11, 16, 16, 0.95));
  overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.hero:before {
  content: ""; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(47, 211, 184, 0.08), transparent 60%);
  pointer-events: none;
}
.hero > * { position: relative; z-index: 2; }

.footer {
  border-top: 1px solid var(--line); margin-top: auto;
  color: var(--muted); padding: 20px 0; text-align: center; font-size: 14px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(11, 18, 17, 0.3);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px; 
}

.table th, .table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  vertical-align: middle;
  font-size: 14px;
}

.table th {
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(47, 211, 184, 0.03); }

.col-time { width: 15%; white-space: nowrap; color: var(--muted); font-size: 13px; }
.col-ip { width: 15%; font-family: monospace; color: var(--accent2); }
.col-contact { width: 20%; font-weight: 500; }
.col-msg { width: 35%; line-height: 1.6; min-width: 250px; }
.col-status { width: 15%; text-align: center; }

.icon-pill {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  border: 1px solid rgba(47, 211, 184, 0.25);
  background: rgba(47, 211, 184, 0.08);
  color: var(--accent);
}
.feature-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; height: 100%;
  transition: transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); }