/* Payment Hub console styles (black sidebar + blue accents). */

:root {
  --primary: #2F6FED; --primary-2: #5B8CFF;
  --success: #2E9E5B; --warning: #E69F00; --danger: #D64545;
  --ink: #0f1b2d; --muted: #667085;
  --side: #0B1220; --side-2: #131c33;
  --card-shadow: 0 12px 40px rgba(47, 111, 237, 0.10);
  --btn-shadow: 0 8px 20px rgba(47, 111, 237, 0.35);
  --radius: 20px;
}
* { box-sizing: border-box; }
.hidden { display: none !important; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-size: 13.5px; line-height: 1.5;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, sans-serif;
  background: linear-gradient(180deg, #F7F9FF 0%, #FFFFFF 60%);
}
.ph-shell { display: flex; min-height: 100vh; }
/* Sidebar — black, full height, clean scroll (no visible scrollbar) */
.ph-sidebar {
  width: 232px; flex-shrink: 0; background: linear-gradient(180deg, var(--side), var(--side-2));
  color: #dbe4ff; padding: 16px 12px; position: fixed; left: 0; top: 0; bottom: 0;
  height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: none; -ms-overflow-style: none;
  display: flex; flex-direction: column; gap: 2px; z-index: 30;
}
.ph-sidebar::-webkit-scrollbar { display: none; width: 0; }
.ph-body { margin-left: 232px; }
.ph-brand { font-weight: 800; font-size: 1.02rem; text-decoration: none; color: #fff; letter-spacing: -0.02em; padding: 4px 10px 2px; }
.ph-brand span { color: var(--primary-2); }
.ph-env { margin: 0 10px 6px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.08em; color: #0B1220; background: #FFD84D; border-radius: 999px; padding: 2px 8px; display: inline-block; width: fit-content; }
.ph-client { margin: 0 10px 4px; font-size: 0.72rem; color: #9fb2ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-nav-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; color: #7c8db5; padding: 10px 10px 4px; }
.ph-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: #dbe4ff; font-size: 0.83rem; font-weight: 500; }
.ph-link:hover { background: rgba(91, 140, 255, 0.14); color: #fff; }
.ph-link.active { color: #fff; background: linear-gradient(90deg, var(--primary), var(--primary-2)); box-shadow: var(--btn-shadow); }
.ph-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ph-side-foot { margin-top: auto; padding: 10px 4px 2px; font-size: 0.7rem; color: #9fb2ff; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid rgba(155,178,255,0.15); }
.ph-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 6px; }
.ph-logout { background: rgba(91,140,255,0.12); border: 1px solid rgba(155,178,255,0.35); color: #fff; border-radius: 12px; padding: 8px 12px; cursor: pointer; font-size: 0.8rem; font-weight: 600; width: 100%; }
.ph-logout:hover { background: rgba(91,140,255,0.25); border-color: #fff; }
/* Content */
.ph-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-topbar { display: flex; position: sticky; top: 0; z-index: 20; background: var(--side); color: #fff; padding: 10px 16px; align-items: center; gap: 12px; }
.ph-topbar .ph-menu-btn { display: none; }
.ph-topbar .spacer { flex: 1; }
.ph-topbar .who { font-size: 0.75rem; color: #9fb2ff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.ph-topbar .who strong { color: #fff; font-weight: 600; }
.ph-auth-btn { background: rgba(91,140,255,0.16); border: 1px solid rgba(155,178,255,0.4); color: #fff; border-radius: 10px; padding: 7px 14px; cursor: pointer; font-size: 0.78rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ph-auth-btn:hover { background: rgba(91,140,255,0.3); }
.ph-main { max-width: 68rem; width: 100%; margin: 0 auto; padding: 24px 20px 48px; }
.ph-card { background: #fff; border-radius: 16px; box-shadow: var(--card-shadow); padding: 20px; border: 1px solid rgba(47, 111, 237, 0.08); }
.ph-title { margin: 0 0 6px; font-size: 1.25rem; letter-spacing: -0.02em; }
.ph-sub { margin: 0 0 16px; color: var(--muted); font-size: 0.83rem; line-height: 1.5; }
/* Banner + alerts */
.ph-banner { border-radius: 14px; padding: 12px 16px; font-size: 0.85rem; margin-bottom: 16px; border: 1px solid; }
.ph-warn { color: #7a5200; background: #FFF7E0; border-color: #E69F00; }
.ph-err { color: #8f1d1d; background: #FFF0F0; border-color: var(--danger); }
.ph-info { color: #1a3faa; background: #EEF3FF; border-color: var(--primary); }
.ph-ok { color: #1d6b3c; background: #EDF9F1; border-color: var(--success); }
/* Forms — visible everywhere by default */
.ph-card input[type="text"], .ph-card input[type="email"], .ph-card input[type="password"],
.ph-card input[type="number"], .ph-card input[type="url"], .ph-card input[type="search"],
.ph-card input:not([type]), .ph-card select, .ph-card textarea,
form input[type="text"], form input[type="email"], form input[type="password"],
form input[type="number"], form input[type="url"], form input:not([type]),
form select, form textarea {
  display: block; width: 100%; margin: 6px 0 12px; padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid rgba(47, 111, 237, 0.3); font-size: 0.9rem; color: var(--ink); background: #fff;
}
form input:focus, form select:focus, form textarea:focus, .ph-card input:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}
form label { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
form input[type="checkbox"] { width: auto; display: inline-block; margin: 0 6px 0 0; accent-color: var(--primary); }
/* Password field with inside eye toggle */
.ph-pass-wrap { position: relative; }
.ph-pass-wrap input { padding-right: 42px !important; }
.ph-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; }
.ph-eye:hover { color: var(--primary); }
.ph-eye svg { width: 18px; height: 18px; display: block; }
.ph-eye [hidden] { display: none !important; }
/* Buttons */
.ph-btn { display: inline-block; border: none; cursor: pointer; border-radius: 12px; padding: 10px 18px; font-weight: 600; font-size: 0.85rem; color: #fff; background: linear-gradient(90deg, var(--primary), var(--primary-2)); box-shadow: var(--btn-shadow); text-decoration: none; transition: transform 0.08s ease; }
.ph-btn:hover { transform: translateY(-1px); }
.ph-btn:active { transform: translateY(0) scale(0.98); }
.ph-btn-plain { background: #fff; color: var(--ink); border: 1.5px solid rgba(47,111,237,0.25); box-shadow: none; }
/* Tables */
.ph-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.ph-table th { text-align: left; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid rgba(47, 111, 237, 0.12); }
.ph-table td { padding: 9px 10px; border-bottom: 1px solid rgba(0, 0, 0, 0.05); vertical-align: top; }
.ph-pill { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #EEF3FF; color: var(--primary); }
.ph-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 20px; }
.ph-stat { background: #fff; border-radius: 18px; padding: 16px; border: 1px solid rgba(47, 111, 237, 0.08); box-shadow: var(--card-shadow); }
.ph-stat b { font-size: 1.6rem; display: block; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
/* Modal ceremonies (webmail-style): overlay + card, × / outside / Esc to close */
.ph-modal { position: fixed; inset: 0; z-index: 100; background: rgba(11, 18, 32, 0.55);
  display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px;
  overflow-y: auto; }
.ph-modal.hidden { display: none; }
.ph-modal-card { position: relative; background: #fff; border-radius: 20px;
  box-shadow: 0 24px 80px rgba(11, 18, 32, 0.4); padding: 24px; width: 100%; max-width: 36rem; }
#ph-modal-close { position: absolute; top: 10px; right: 14px; background: none; border: none;
  font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; }
#ph-modal-close:hover { color: var(--ink); }
/* Inline row forms (ops tables): compact inputs, never full-width */
.ph-row-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.ph-row-form input:not([type]), .ph-row-form input[type="text"] {
  display: inline-block; width: 130px; margin: 0; padding: 7px 10px; }
.ph-row-form input[name="ticket"] { width: 90px; }
.ph-row-form .ph-btn { padding: 7px 12px; }
/* Friendly help bubbles (?) — click to open, click away/Esc to close */
.ph-help { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-left: 6px; border-radius: 50%; border: 1.5px solid var(--primary-2);
  background: #EEF3FF; color: var(--primary); font-size: 0.72rem; font-weight: 800; cursor: pointer;
  vertical-align: middle; padding: 0; }
.ph-help:hover { background: var(--primary); color: #fff; }
.ph-help .ph-tip { display: none; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%);
  width: max-content; max-width: 260px; white-space: normal; text-align: left; font-weight: 400;
  background: #0B1220; color: #fff; font-size: 0.8rem; line-height: 1.5; border-radius: 12px;
  padding: 10px 12px; z-index: 60; box-shadow: 0 12px 32px rgba(11,18,32,0.35); }
.ph-help.open .ph-tip { display: block; }
/* Copy boxes — hover (or keyboard focus) reveals the copy button */
.ph-codebox { position: relative; }
.ph-codebox pre { padding-right: 52px; }
.ph-codebox button[data-copy] { position: absolute; top: 8px; right: 8px; opacity: 0;
  border: 1px solid rgba(47,111,237,0.3); background: #fff; color: var(--primary);
  border-radius: 8px; padding: 4px 10px; font-size: 0.75rem; font-weight: 700; cursor: pointer;
  transition: opacity 0.15s ease; }
.ph-codebox:hover button[data-copy], .ph-codebox:focus-within button[data-copy] { opacity: 1; }
.ph-codebox button[data-copy].copied { color: var(--success); border-color: var(--success); }
@media (max-width: 860px) {
  .ph-sidebar { transform: translateX(-100%); transition: transform 0.2s ease; }
  .ph-sidebar.open { transform: none; }
  .ph-body { margin-left: 0; }
  .ph-topbar .ph-menu-btn { display: inline-block; }
  .ph-scrim { position: fixed; inset: 0; background: rgba(11, 18, 32, 0.45); z-index: 25; }
  .ph-scrim.hidden { display: none; }
}

