/* Shared styles for the KHALA account-deletion pages.
   Per-app accent colours are injected at runtime by delete-account.js. */

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

:root {
  --brand: #2EC5B6;
  --brand2: #6C8BFF;
  --bg0: #070B14;
  --bg1: #0E1524;
  --line: rgba(255, 255, 255, 0.10);
  --text-hi: #F3F6FC;
  --text-mid: #B9C3D6;
  --text-lo: #7C8AA5;
  --danger: #EF4444;
  --danger-dark: #B91C1C;
  --ok: #10B981;
}

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 620px at 50% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 55%, var(--bg0));
  color: var(--text-hi);
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Cairo", system-ui, -apple-system, sans-serif;
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 18px 56px;
}

.wrap { width: 100%; max-width: 560px; }

/* ── Header ─────────────────────────────────────────────── */
.head { text-align: center; margin-bottom: 26px; }

.logo {
  width: 88px; height: 88px;
  border-radius: 24px;
  object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  background: var(--bg1);
}

.app-name { font-size: 26px; font-weight: 800; margin: 14px 0 2px; }
.page-name { font-size: 15px; color: var(--text-mid); margin: 0; }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.card + .card { margin-top: 18px; }

h2 { font-size: 18px; margin: 0 0 6px; font-weight: 700; }
h3 { font-size: 15px; margin: 22px 0 8px; font-weight: 700; color: var(--text-hi); }
p  { margin: 0 0 12px; color: var(--text-mid); font-size: 14.5px; }
.muted { color: var(--text-lo); font-size: 13px; }

ul { margin: 0 0 12px; padding-inline-start: 22px; color: var(--text-mid); font-size: 14.5px; }
li { margin-bottom: 6px; }

/* ── Form ───────────────────────────────────────────────── */
label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 6px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text-hi);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent);
}

.field { margin-bottom: 16px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-mid);
  cursor: pointer;
}
.check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--danger); flex-shrink: 0; }

button {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  font-size: 15.5px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s ease, opacity .18s ease, filter .18s ease;
}
button:hover:not(:disabled) { filter: brightness(1.08); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }

.btn-primary { background: linear-gradient(90deg, var(--brand), var(--brand2)); color: #04121C; }
.btn-danger  { background: linear-gradient(90deg, var(--danger), var(--danger-dark)); color: #fff; }
.btn-ghost   { background: transparent; border: 1px solid var(--line); color: var(--text-mid); margin-top: 10px; }

/* ── Banners ────────────────────────────────────────────── */
.banner {
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.banner-warn   { background: rgba(239, 68, 68, .09);  border-color: rgba(239, 68, 68, .30);  color: #FCA5A5; }
.banner-error  { background: rgba(239, 68, 68, .14);  border-color: rgba(239, 68, 68, .45);  color: #FEC2C2; }
.banner-ok     { background: rgba(16, 185, 129, .10); border-color: rgba(16, 185, 129, .32); color: #6EE7B7; }
.banner strong { color: inherit; }

.account-box {
  background: rgba(0, 0, 0, .28);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.account-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 4px 0; }
.account-row span:first-child { color: var(--text-lo); }
.account-row span:last-child  { color: var(--text-hi); font-weight: 600; word-break: break-all; }

.success-mark {
  width: 66px; height: 66px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: rgba(16, 185, 129, .12);
  border: 2px solid rgba(16, 185, 129, .45);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: var(--ok);
}

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: -3px;
  margin-inline-end: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ── English summary (LTR block inside an RTL page) ─────── */
.ltr {
  direction: ltr;
  text-align: left;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
}
.ltr ul { padding-inline-start: 20px; }

footer {
  text-align: center;
  margin-top: 26px;
  font-size: 12.5px;
  color: var(--text-lo);
}
footer a { color: var(--brand); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── App picker (hub page) ──────────────────────────────── */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.app-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  color: var(--text-hi);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: border-color .18s ease, background .18s ease;
}
.app-link:hover { border-color: var(--brand); background: rgba(255, 255, 255, .06); }
.app-link img { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; }

@media (max-width: 480px) {
  body { padding: 22px 14px 40px; }
  .card { padding: 20px 17px; }
  .app-name { font-size: 22px; }
}
