/* PhantomFox - shared UI styles. Self-contained, no external assets. */
:root {
  --bg: #001A3A;
  --panel: #06264A;
  --panel-2: #0B3059;
  --border: rgba(255,255,255,0.16);
  --text: #FFFFFF;
  --muted: rgba(255,255,255,0.62);
  --accent: #FFFFFF;
  --accent-2: #FFFFFF;
  --danger: #ff5c5c;
  --ok: #46d18a;
  --radius: 10px;
  --font: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #0B3059 0%, var(--bg) 55%);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .3px; }
.brand .mark { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; }
.brand .name { font-size: 18px; }
.brand .name span { color: var(--accent); }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--border); background: rgba(15,17,21,.6);
  position: sticky; top: 0; backdrop-filter: blur(6px); z-index: 5;
}
.topbar .links { display: flex; gap: 14px; align-items: center; }
.topbar a { color: var(--muted); text-decoration: none; font-size: 14px; }
.topbar a:hover { color: var(--text); }

.wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; }
.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.card.narrow { width: 100%; max-width: 380px; }

h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 16px; margin: 26px 0 12px; color: var(--text); }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 20px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=email], input[type=url], select {
  width: 100%; padding: 10px 12px; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; font-family: var(--font); font-size: 14px;
}
input:focus, select:focus, [contenteditable]:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.row { display: flex; gap: 14px; }
.row > div { flex: 1; }

.editor-toolbar { display: flex; gap: 8px; align-items: center; margin: 6px 0; flex-wrap: wrap; }
.editor {
  min-height: 220px; background: #fff; color: #111; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; font-family: Arial, Helvetica, sans-serif; font-size: 14px;
  line-height: 1.5; overflow-wrap: anywhere;
}
.editor img { max-width: 100%; height: auto; }

button {
  background: var(--accent); color: #001A3A; border: 0; border-radius: 8px; padding: 10px 16px;
  font-weight: 700; font-size: 14px; cursor: pointer; font-family: var(--font);
}
button:hover { background: #e9eef5; }
button.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); font-weight: 600; }
button.ghost:hover { background: rgba(255,255,255,0.06); }
button:disabled { opacity: .5; cursor: not-allowed; }

.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.note {
  font-size: 12px; color: var(--muted); background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-top: 8px;
}
.msg { margin-top: 16px; padding: 10px 12px; border-radius: 8px; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.error { background: rgba(255,92,92,.12); border: 1px solid rgba(255,92,92,.4); color: #ffb3b3; }
.msg.ok { background: rgba(70,209,138,.12); border: 1px solid rgba(70,209,138,.4); color: #a9f0cf; }

.actions { display: flex; gap: 10px; align-items: center; margin-top: 20px; }
.actions .grow { flex: 1; text-align: center; }
.spacer { flex: 1; }

table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td .tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.tag.pending { background: rgba(255,154,99,.15); color: var(--accent-2); }
.tag.authorized { background: rgba(70,209,138,.15); color: var(--ok); }
.tag.rejected { background: rgba(255,92,92,.15); color: #ff9c9c; }
.tag.suspended { background: rgba(255,92,92,.15); color: #ff9c9c; }
td button { padding: 5px 10px; font-size: 12px; margin-right: 6px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); word-break: break-all; }

/* --- inline field validation --- */
.field-err { color: var(--danger); font-size: 12px; margin-top: 5px; min-height: 14px; }
input.invalid { border-color: var(--danger); }

/* --- send-result modal (success / failure) --- */
.modal { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; z-index: 50; background: rgba(0,8,20,.62); }
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 340px; min-height: 300px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 30px 26px 24px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.5);
  display: flex; flex-direction: column; align-items: center;
  animation: modalpop .34s cubic-bezier(.2,.9,.3,1.3) both;
}
.modal-badge { position: relative; width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%; background: #00112f; display: grid; place-items: center; }
.modal-badge img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; display: block; }
.modal.ok .modal-badge { box-shadow: 0 0 0 3px var(--ok), 0 0 30px rgba(70,209,138,.35); }
.modal.fail .modal-badge { box-shadow: 0 0 0 3px var(--danger), 0 0 30px rgba(255,92,92,.3); animation: shake .5s ease-in-out 1; }
.modal-icon { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #001A3A; border: 2px solid var(--bg); }
.modal.ok .modal-icon { background: var(--ok); }
.modal.fail .modal-icon { background: var(--danger); }
.modal-card h2 { font-size: 22px; margin: 0 0 6px; }
.modal-card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 auto 16px; max-width: 30ch; }
.modal-chip { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.modal.ok .modal-chip { color: var(--ok); }
.modal.fail .modal-chip { color: var(--danger); }
.modal-actions { margin-top: auto; padding-top: 22px; }
.modal-actions button { min-width: 150px; }
@keyframes modalpop { from { opacity: 0; transform: translateY(8px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes hop { 0%,100% { transform: translateY(0); } 30% { transform: translateY(-7px); } 50% { transform: translateY(0); } 68% { transform: translateY(-3px); } 82% { transform: translateY(0); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .modal-card, .modal-badge { animation: none !important; } }

/* --- mobile pass (phones ≤ 560px) --- */
@media (max-width: 560px) {
  .wrap { padding: 20px 14px 48px; }
  .topbar { padding: 12px 14px; }
  .topbar .links { gap: 10px; }
  .card { padding: 20px 16px; }
  /* stack the paired fields into one column */
  .row { flex-direction: column; gap: 0; }
  /* admin tables: let wide tables scroll sideways instead of spilling off-screen */
  table { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
  h1 { font-size: 20px; }
}
