/* Foxo Assets: the website's look (ink, greys, Foxo pink), kept simple for an internal tool. */
:root {
  --paper: #ffffff;
  --ink: #0b0b0b;
  --grey-700: #444444;
  --grey-600: #666666;
  --grey-300: #cccccc;
  --grey-200: #e3e3e3;
  --grey-100: #f4f4f4;
  --accent: #e0004f;
  --accent-soft: #ffe5ee;
  --radius: 6px;
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--grey-600);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.primary {
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.small {
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 13px;
}

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--grey-700);
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Bar ---------- */

.bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--grey-200);
}

.brand {
  font-weight: 600;
}

.brand b {
  color: var(--accent);
}

.who {
  margin-left: auto;
  color: var(--grey-600);
  font-size: 13px;
}

/* ---------- Sign in ---------- */

body.is-signin {
  background:
    radial-gradient(60rem 40rem at 50% -10%, var(--accent-soft), transparent 70%),
    var(--paper);
}

body.is-signin .bar {
  display: none;
}

.signin {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.25rem;
  min-height: 100vh;
  padding: 2rem 1.25rem;
}

.signin__card {
  width: min(100%, 24rem);
  padding: 2.25rem 2rem 1.75rem;
  border: 1px solid var(--grey-200);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 12px 32px rgb(0 0 0 / 0.06);
}

/* The fox icon, in Foxo pink. */
.signin__mark {
  display: block;
  width: 2.5rem;
  height: 2.6rem;
  background: var(--accent);
  -webkit-mask: url('/foxo-icon.svg') center / contain no-repeat;
  mask: url('/foxo-icon.svg') center / contain no-repeat;
}

.signin h1 {
  margin-top: 1.25rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.signin__lead {
  margin: 0.35rem 0 0;
  color: var(--grey-600);
}

.signin form {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.75rem;
}

.signin label {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-700);
}

.signin input {
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--grey-300);
  border-radius: 10px;
  background: var(--paper);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.signin input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.signin .primary {
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}

.signin .primary:hover {
  filter: brightness(0.94);
}

.signin__sent {
  margin: 0 0 0.4rem;
  color: var(--grey-700);
  font-size: 14px;
}

.signin__code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.5em;
  text-align: center;
  text-indent: 0.5em;
}

.signin__again {
  justify-self: center;
  margin-top: 0.4rem;
  font-size: 13px;
}

.note {
  min-height: 1.4em;
  margin: 1rem 0 0;
  font-size: 13px;
  color: var(--accent);
}

.note:empty {
  display: none;
}

.signin__foot {
  margin: 0;
  font-size: 12px;
  color: var(--grey-600);
}

/* ---------- Inline add forms (sidebar) ---------- */

.add {
  padding: 0.15rem 0.45rem;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--grey-600);
  font-size: 12px;
}

.add:hover {
  background: var(--grey-200);
  color: var(--ink);
}

.inline {
  display: grid;
  gap: 0.45rem;
  margin: 0.4rem 0 0.2rem;
  padding: 0.6rem;
  border: 1px solid var(--grey-300);
  border-radius: 10px;
  background: var(--paper);
}

.inline input {
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  font-size: 14px;
}

.inline input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.inline__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.small--primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.inline__error {
  margin: 0;
  font-size: 12px;
  color: var(--accent);
}

.inline__error:empty {
  display: none;
}

/* ---------- Layout ---------- */

.app {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  min-height: calc(100vh - 3.2rem);
}

@media (max-width: 760px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }
}

.side {
  padding: 1rem;
  border-right: 1px solid var(--grey-200);
  background: var(--grey-100);
}

.side__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.side__head h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-600);
}

.orgs,
.teams {
  margin: 0;
  padding: 0;
  list-style: none;
}

.org {
  margin-bottom: 0.75rem;
}

.org__name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.teams {
  margin: 0.3rem 0 0;
}

.teams button {
  display: block;
  width: 100%;
  padding: 0.35rem 0.6rem;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--grey-700);
  text-align: left;
}

.teams button:hover {
  background: var(--grey-200);
}

.teams button[aria-current='true'] {
  background: var(--ink);
  color: var(--paper);
}

/* ---------- Team ---------- */

.team {
  padding: 1.5rem 2rem 4rem;
}

.empty {
  margin-top: 2rem;
}

.team__head h1 {
  font-size: 1.6rem;
}

.team__head p {
  margin: 0.2rem 0 0;
}

.group {
  margin-top: 2rem;
}

.group h2 {
  font-size: 1rem;
}

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}

.slot {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid var(--grey-200);
  border-radius: 10px;
}

.slot.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.slot__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.slot__head h3 {
  font-size: 15px;
  text-transform: capitalize;
}

.slot__hint {
  font-size: 12px;
  color: var(--grey-600);
}

.preview {
  display: grid;
  place-items: center;
  height: 8rem;
  border-radius: var(--radius);
  background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 0 / 16px 16px;
  overflow: hidden;
}

.preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.preview .none {
  color: var(--grey-600);
  font-size: 13px;
}

.meta {
  font-size: 12px;
  color: var(--grey-600);
  word-break: break-all;
}

.url {
  display: flex;
  gap: 0.4rem;
}

.url input {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  background: var(--grey-100);
}

.upload {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 13px;
}

.upload input {
  display: none;
}

.history summary {
  font-size: 13px;
  color: var(--grey-700);
  cursor: pointer;
}

.history ul {
  margin: 0.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.history li {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 12px;
}

.history li span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.6rem 1rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
}

/* ---------- Version (bottom right, out of the way) ---------- */

.version {
  position: fixed;
  right: 1rem;
  bottom: 0.75rem;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--grey-300);
  pointer-events: none;
  user-select: none;
}
