/* The wallet wears the task manager's sign-in: the same photograph, the same
   glass card, the same type and the same teal. Someone sent here from an
   application should not feel they have left it. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-variable.woff2') format('woff2');
}

:root {
  --brand-navy: #1a396b;
  --brand-navy-dark: #12294d;
  --brand-teal: #0097b2;
  --brand-teal-dark: #00758a;
  --brand-teal-light: #5ce1e6;
  --ink: #131212;
  --ink-2: #4a5568;
  --line: #e2e8f0;
  --page: #f5f7fa;
  --glass-ink: #e9eef6;
  --glass-ink-2: rgba(233, 238, 246, 0.75);
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
  font: 15px/1.55 var(--font);
}

/* ---------- Card pages: sign-in, invitation, account ----------
   No photograph: a deep navy ground drawn in CSS, lit teal from one corner,
   with a faint drawing grid that fades towards the edges - a technical
   office's paper, not a place anyone could recognise. */
body.center {
  color-scheme: dark;
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: #0b1730;
  background-image:
    radial-gradient(60% 55% at 12% 8%, rgba(0, 151, 178, 0.28) 0%, rgba(0, 151, 178, 0) 70%),
    radial-gradient(55% 60% at 92% 96%, rgba(26, 57, 107, 0.85) 0%, rgba(26, 57, 107, 0) 70%),
    linear-gradient(160deg, #0e1f3d 0%, #0b1730 55%, #08111f 100%);
  color: var(--glass-ink);
  overflow-x: hidden;
}

body.center::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(92, 225, 230, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 225, 230, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 160px 160px, 160px 160px, 32px 32px, 32px 32px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 45%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  mask-image: radial-gradient(75% 70% at 50% 45%, #000 0%, rgba(0, 0, 0, 0.35) 55%, transparent 100%);
  pointer-events: none;
}

body.center > * { position: relative; }

.card {
  position: relative;
  width: 100%;
  max-width: 480px;
  padding: 44px 44px 36px;
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid transparent;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.55), 0 8px 30px -10px rgba(0, 0, 0, 0.35);
  -webkit-backdrop-filter: blur(16px) saturate(125%) brightness(0.92);
  backdrop-filter: blur(16px) saturate(125%) brightness(0.92);
  text-shadow: 0 1px 12px rgba(4, 10, 20, 0.55);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(255, 255, 255, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* The logo's mark is centred over the word, so the block is centred too:
   set flush left, the mark looked pushed off its axis. */
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 30px; text-align: center; }
.brand img { width: 190px; height: auto; display: block; }
.brand small {
  font-size: 12px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase;
  color: rgba(233, 238, 246, 0.72); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}

.card h1 { margin: 0 0 12px; font-size: 24px; font-weight: 500; color: #fff; line-height: 1.25; text-align: center; }
.card > p:first-of-type, .card section > p:first-of-type { text-align: center; }
.card h2 { margin: 24px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em;
           text-transform: uppercase; color: rgba(233, 238, 246, 0.65); }
.card p { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: var(--glass-ink-2); text-wrap: pretty; }
.card p strong { color: #fff; }
.card > .status { display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 600;
                  color: var(--brand-teal-light); }
.note { margin: 26px 0 0 !important; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.12);
        font-size: 13.5px !important; text-align: center; }

.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; }
.field span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(233, 238, 246, 0.65); margin-bottom: 7px;
}
.card .field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  backdrop-filter: blur(8px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.card .field input::placeholder { color: rgba(233, 238, 246, 0.35); }
.card .field input:focus {
  outline: none;
  border-color: var(--brand-teal-light);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(92, 225, 230, 0.18);
}
#code { font-size: 22px !important; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 600; letter-spacing: 0.02em;
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s, background 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: default; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--brand-teal-light); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-teal-dark) 100%);
  color: #fff; border: 0;
  box-shadow: 0 10px 24px rgba(0, 151, 178, 0.35);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 151, 178, 0.45);
  filter: brightness(1.06);
}
.card .btn-line {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--glass-ink);
}
.card .btn-line:hover:not(:disabled) { background: rgba(255, 255, 255, 0.13); }
.btn-block { width: 100%; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }

.message { margin: 14px 0 0; font-size: 13px; font-weight: 600; }
.card .message.error { color: #ff8a9a; }
.card .message.ok { color: var(--brand-teal-light); }

.list { list-style: none; margin: 0 0 14px; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.list li { display: flex; flex-direction: column; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.list li strong { color: #fff; font-weight: 600; }
.card .muted { font-size: 12.5px; color: rgba(233, 238, 246, 0.6); }
.card #email { margin-top: -6px; }

@media (max-width: 520px) {
  body.center { padding: 16px; }
  .card { padding: 34px 24px 28px; border-radius: 22px; }
  .brand img { width: 170px; }
  .card p { font-size: 14.5px; }
}

/* ---------- Administration: the task manager's light working screens ---------- */
body.admin { background: var(--page); }
.bar {
  display: flex; align-items: center; gap: 16px; padding: 12px 24px;
  background: linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-navy-dark) 100%);
  color: #fff;
}
.brand-sm { height: 34px; width: auto; }
.bar-title { font-weight: 600; letter-spacing: 0.01em; }
.bar-user { margin-left: auto; font-size: 14px; opacity: 0.9; }
.bar-button {
  min-height: 34px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 8px;
  background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.bar-button:hover { background: rgba(255, 255, 255, 0.16); }
.bar-button:focus-visible { outline: 2px solid var(--brand-teal-light); outline-offset: 2px; }
.panel-actions { margin-top: 14px; }
.wide { max-width: 1120px; margin: 0 auto; padding: 24px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none;
  font: inherit; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.tab[aria-selected="true"] { color: var(--brand-navy); border-bottom-color: var(--brand-teal); }
.tab:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 2px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.panel h2 { margin: 0 0 14px; font-size: 16px; color: var(--brand-navy); }
.panel h3 { margin: 0 0 8px; font-size: 15px; color: var(--brand-navy); }
.panel p { margin: 0 0 12px; color: var(--ink-2); }
.panel .muted { color: var(--ink-2); font-size: 13px; }
.admin .field span { font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.admin .field input {
  font: inherit; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff;
}
.admin .field input:focus { outline: none; border-color: var(--brand-teal); box-shadow: 0 0 0 3px rgba(0, 151, 178, 0.15); }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; }
.row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.row .field { flex: 1 1 220px; }
.admin .btn-line { background: #fff; border-color: #cbd5e1; color: var(--ink); }
.admin .btn-line:hover:not(:disabled) { background: #f1f5f9; }
.btn-danger { background: #fff; border-color: #f1c4c4; color: #b42318; }
.btn-danger:hover:not(:disabled) { background: #fef3f2; }
.btn-small { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.admin .message.error { color: #b42318; }
.admin .message.ok { color: var(--brand-teal-dark); }
.issued { margin-top: 18px; padding: 16px; border: 1px solid #a5e3ea; background: #f0fbfd; border-radius: 10px; }
.secret { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0; }
.code { font-size: 22px; font-weight: 700; letter-spacing: 0.08em; color: var(--brand-navy); }
.link { word-break: break-all; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 8px; border-bottom: 1px solid #cbd5e1; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.actions-cell { display: flex; gap: 6px; justify-content: flex-end; }
.chip { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #e0f5f9; color: var(--brand-teal-dark);
        font-size: 12px; font-weight: 600; }
.status { font-weight: 600; }
.status.ok { color: var(--brand-teal-dark); }
.status.wait { color: #b54708; }
.status.off { color: #b42318; }
@media (max-width: 760px) {
  .table thead { display: none; }
  .table tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .table td { border: 0; padding: 2px 0; }
  .actions-cell { justify-content: flex-start; margin-top: 6px; }
}
