:root {
  --brand: #1AA9BA;
  --brand-deep: #128a99;
  --brand-soft: rgba(26, 169, 186, 0.12);
  --gray: #7F7F7F;
  --gray-soft: #a3a3a3;
  --ink: #2c2c2c;
  --bg: #f4fbfc;
  --bg-deep: #e7f5f7;
  --surface: rgba(255, 255, 255, 0.88);
  --line: rgba(127, 127, 127, 0.22);
  --ok: #1f7a4d;
  --warn: #9a6b16;
  --danger: #9b3a32;
  --shadow: 0 16px 36px rgba(26, 169, 186, 0.1);
  --radius: 18px;
  --font-display: "El Messiri", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(26, 169, 186, 0.2), transparent 58%),
    radial-gradient(760px 420px at 100% 0%, rgba(127, 127, 127, 0.12), transparent 52%),
    linear-gradient(165deg, #ffffff 0%, var(--bg) 48%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 18% 24%, rgba(26, 169, 186, 0.1) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 62%, rgba(127, 127, 127, 0.08) 0 1.5px, transparent 2.5px);
  background-size: 46px 46px, 34px 34px;
  animation: drift 26s linear infinite;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-46px); }
}

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

@keyframes softPulse {
  0%, 100% { transform: scale(1); opacity: 0.45; }
  50% { transform: scale(1.06); opacity: 0.8; }
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup img,
.logo-mark {
  width: auto;
  height: 52px;
  object-fit: contain;
  display: block;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
  margin: 0;
  color: var(--gray);
}

.brand-name .accent {
  color: var(--brand);
}

.brand-sub {
  margin: 4px 0 0;
  color: var(--gray);
  font-size: 0.95rem;
}

.hero {
  width: min(720px, 100%);
  text-align: center;
  animation: rise 0.7s ease both;
}

.hero .logo-wrap {
  position: relative;
  display: inline-flex;
  margin: 0 auto 18px;
  padding: 18px 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero .logo-wrap::after {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 36px;
  border: 1px solid rgba(26, 169, 186, 0.25);
  animation: softPulse 4.5s ease-in-out infinite;
}

.hero .logo-wrap img {
  width: min(320px, 72vw);
  height: auto;
  display: block;
}

.hero h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero p {
  margin: 0 auto 28px;
  max-width: 34rem;
  color: var(--gray);
  font-size: 1.05rem;
  line-height: 1.8;
}

.actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

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

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover { background: var(--brand-deep); }

.btn-ghost {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
}

.panel {
  width: min(420px, 100%);
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  animation: rise 0.65s ease both;
}

.panel h1,
.panel h2 {
  font-family: var(--font-display);
  margin: 0 0 6px;
  color: var(--ink);
}

.panel .hint {
  margin: 0 0 22px;
  color: var(--gray);
  line-height: 1.7;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  text-align: right;
}

.field label {
  font-size: 0.92rem;
  color: var(--gray);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(26, 169, 186, 0.55);
  box-shadow: 0 0 0 4px var(--brand-soft);
}

.alert {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(155, 58, 50, 0.08);
  color: var(--danger);
  border: 1px solid rgba(155, 58, 50, 0.16);
  font-size: 0.92rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  animation: rise 0.5s ease both;
}

.topbar .meta {
  color: var(--gray);
  font-size: 0.92rem;
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 860px) {
  .grid-2 { grid-template-columns: 1.1fr 0.9fr; }
}

.section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  animation: rise 0.6s ease both;
}

.section h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink);
}

.status-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
}

.status-list code {
  font-size: 0.86rem;
  color: var(--ink);
}

.badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-ok {
  background: rgba(31, 122, 77, 0.12);
  color: var(--ok);
}

.badge-wait {
  background: rgba(26, 169, 186, 0.12);
  color: var(--brand-deep);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.kpi {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.75);
  border: 1px solid var(--line);
}

.kpi span {
  display: block;
  color: var(--gray);
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.kpi strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}

.kpi strong.ok { color: var(--ok); }
.kpi strong.err { color: var(--danger); }

.log-box {
  margin: 0;
  max-height: 320px;
  overflow: auto;
  padding: 14px;
  border-radius: 14px;
  background: #1f2a2c;
  color: #d7eef1;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
}

.muted { color: var(--gray); }
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  word-break: break-all;
}

.footer-note {
  margin-top: 18px;
  text-align: center;
  color: var(--gray);
  font-size: 0.86rem;
}
