/* Wise dark theme: wise.live colours, Wise webapp shape rules, moving "Aurora" glow. See docs/mockup.html. */
:root {
  --bg: #0f081a; --card: #170d29; --card2: #1d1233; --line: #2c2145; --line2: #3a2d5a;
  --text: #ece9f5; --soft: #c9ccd8; --muted: #8989a2;
  --p: #924dff; --p2: #7b1ee3; --o: #ff6833; --err: #ff8a65; --r: 10px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { background: var(--bg); }
body { margin: 0; color: var(--text); font: 14px/1.5 Inter, system-ui, -apple-system, sans-serif; min-height: 100vh; overflow-x: hidden; }

/* Wise "Aurora" page pattern: primary glow top-right, accent bottom-left. closest-side fades each
   glow to fully transparent inside its own box, so no edge ever shows while it moves. */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora::before, .aurora::after { content: ""; position: absolute; width: 80vmax; height: 65vmax; border-radius: 50%; will-change: transform; }
.aurora::before { right: -30vmax; top: -30vmax; animation: wave1 12s ease-in-out infinite;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--p) 55%, transparent), color-mix(in srgb, var(--p) 18%, transparent) 55%, transparent); }
.aurora::after { left: -30vmax; bottom: -30vmax; animation: wave2 15s ease-in-out infinite;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--o) 40%, transparent), color-mix(in srgb, var(--o) 12%, transparent) 55%, transparent); }
@keyframes wave1 { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(-14vw, 10vh) scale(1.15); } 50% { transform: translate(-26vw, 4vh) scale(.95); } 75% { transform: translate(-10vw, -4vh) scale(1.1); } }
@keyframes wave2 { 0%, 100% { transform: translate(0, 0) scale(1); } 25% { transform: translate(12vw, -8vh) scale(1.1); } 50% { transform: translate(24vw, -18vh) scale(.9); } 75% { transform: translate(8vw, -24vh) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .aurora::before, .aurora::after { animation: none; } }

.wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 16px 60px; }
main { padding-top: 20px; }
main.narrow { max-width: 560px; margin: 0 auto; }
main.center { min-height: 80vh; display: grid; place-items: center; }

.topbar { display: flex; align-items: center; gap: 20px; height: 56px; border-bottom: 1px solid var(--line); }
.topbar a { color: var(--muted); text-decoration: none; padding: 16px 0; border-bottom: 2px solid transparent; }
.topbar a.on { color: var(--text); border-color: var(--p); }
.topbar a.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 16px; border: 0; padding: 0; }
.topbar a.brand img { border-radius: 7px; display: block; }
.topbar .sp { flex: 1; }
.topbar form { margin: 0; }
.link { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 0; }
.link:hover { color: var(--text); }
.av { width: 30px; height: 30px; border-radius: 50%; background: var(--p2); display: grid; place-items: center; font-size: 13px; color: #fff; flex: none; }

.card { background: color-mix(in srgb, var(--card) 55%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card.login { width: min(380px, 100%); text-align: center; }
h1 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
h2 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.muted { color: var(--muted); }
.block { display: block; font-size: 12px; }

.who { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 60%, transparent); border-radius: 8px; padding: 8px 10px; margin: 12px 0; }
.who b { display: block; font-weight: 500; }
.who span { font-size: 12px; color: var(--muted); }

.guidelines { border: 1px solid color-mix(in srgb, var(--p) 35%, transparent); background: color-mix(in srgb, var(--p) 8%, transparent); border-radius: 8px; padding: 12px 14px; margin-bottom: 6px; }
.guidelines ol { margin: 0; padding-left: 18px; color: var(--soft); font-size: 13px; }
.guidelines li + li { margin-top: 6px; }
.guidelines b { color: var(--text); font-weight: 500; }

label { display: block; font-size: 13px; font-weight: 500; color: var(--soft); margin: 14px 0 6px; }
label i { color: var(--o); font-style: normal; }
.hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
input, select { width: 100%; height: 36px; background: var(--bg); border: 1px solid var(--line2); color: var(--text); border-radius: 8px; padding: 0 10px; font: inherit; }
input:focus, select:focus, button:focus-visible, tr.person:focus-visible { outline: none; border-color: var(--p); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 30%, transparent); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

.seg { display: flex; background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 3px; gap: 3px; }
.seg button { flex: 1; min-height: 30px; background: none; border: 0; color: var(--muted); border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer; padding: 4px 6px; }
.seg button.on { background: var(--card2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: transparent; border: 1px solid var(--line2); color: var(--soft); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.chip:hover { border-color: var(--p); color: #fff; }
.count { margin: 10px 0 0; font-size: 13px; color: #d9c4ff; background: color-mix(in srgb, var(--p) 10%, transparent); border-radius: 8px; padding: 8px 10px; }
.err { color: var(--err); font-size: 12px; margin: 4px 0 0; }
.err:empty { display: none; }
.alert { color: #ffd2c2; background: color-mix(in srgb, var(--o) 12%, transparent); border: 1px solid color-mix(in srgb, var(--o) 40%, transparent); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.hide { display: none !important; }

.btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; width: 100%; height: 40px; text-decoration: none; border: 0; border-radius: 8px;
  font: 500 14px/1 Inter, system-ui, sans-serif; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, var(--p), var(--p2)); box-shadow: 0 1px 0 rgba(255, 255, 255, .15) inset, 0 1px 2px rgba(0, 0, 0, .4); }
.btn:disabled { opacity: .6; cursor: wait; }
/* Google sign-in button, dark variant of Google's branding guidelines */
.google { display: flex; align-items: center; justify-content: center; gap: 12px; height: 40px; margin-top: 20px; padding: 0 16px; border-radius: 999px;
  background: #131314; border: 1px solid #8e918f; color: #e3e3e3; font: 500 14px/1 Roboto, Inter, system-ui, sans-serif; text-decoration: none; }
.google:hover { background: #1f1f20; border-color: #c4c7c5; }
.google:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 40%, transparent); }
.card.login .logo { display: block; margin: 4px auto 14px; border-radius: 16px; box-shadow: 0 8px 24px -8px color-mix(in srgb, var(--p) 60%, transparent); }
.card.login h1 { font-size: 22px; }
.card.login .hint { margin-top: 10px; }
.btn.secondary { background: var(--card2); box-shadow: inset 0 0 0 1px var(--line2); }
.success { text-align: center; padding: 20px 0 4px; }
.success p { color: var(--soft); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.tiles div { background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.tiles b { display: block; font-size: 20px; font-weight: 600; }
.tiles span { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
.filters { margin-bottom: 12px; }
.filters input { max-width: 280px; }
.tbl { border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: 500; height: 48px; padding: 0 16px; background: color-mix(in srgb, var(--card2) 80%, transparent); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 8px 16px; border-bottom: 1px solid var(--line); }
tbody > tr:last-child > td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.person { cursor: pointer; }
tr.person:hover td, tr.person[aria-expanded="true"] td { background: color-mix(in srgb, var(--p) 7%, transparent); }
tr.detail > td { background: color-mix(in srgb, var(--bg) 70%, transparent); padding: 4px 8px 10px; }
.records th { height: 32px; background: none; font-size: 12px; padding: 0 8px; }
.records td { border: 0; padding: 4px 8px; font-size: 13px; color: var(--soft); }
td.split span { display: block; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.split span + span { color: var(--soft); }
.tag { font-size: 12px; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.tag.leave { background: color-mix(in srgb, var(--o) 16%, transparent); color: #ffb08f; }
.tag.wfh { background: color-mix(in srgb, var(--p) 20%, transparent); color: #d9c4ff; }
.tag.blocked { background: color-mix(in srgb, var(--err) 18%, transparent); color: var(--err); }
.chip.danger:hover { border-color: var(--err); color: var(--err); }
table.nowrap td { white-space: nowrap; }
.records.mine td { padding: 8px 16px; font-size: 14px; }
.records.mine th { height: 40px; padding: 0 16px; }
.empty a { color: #d9c4ff; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

@media (max-width: 480px) {
  .row { flex-direction: column; gap: 0; }
  .topbar { gap: 14px; }
  .topbar a.brand span { display: none; }
  .seg { flex-wrap: wrap; }
}
