/* ── reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── base ────────────────────────────────────────────────────── */
body {
  font-family: "Manrope", system-ui, sans-serif;
  background: #efefef;
  color: #111;
  line-height: 1.5;
}

a { color: #e10600; text-decoration: none; }
a:hover { opacity: .75; }

/* ── layout ──────────────────────────────────────────────────── */
.page       { max-width: 580px;  margin: 0 auto; padding: 2rem 1.25rem; }
.page--md   { max-width: 860px;  margin: 0 auto; padding: 2rem 1.25rem; }
.page--wide { max-width: 1200px; margin: 0 auto; padding: 2rem 1.25rem; }

/* ── site header ─────────────────────────────────────────────── */
.site-header {
  background: #111;
  border-bottom: 3px solid #e10600;
  padding: .8rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  height: 32px;
  width: auto;
  display: block;
}

.site-header .logo {
  font-size: .9rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}

.site-header .logo em {
  color: #e10600;
  font-style: normal;
}

/* ── typography ──────────────────────────────────────────────── */
h1 {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.2;
  margin: .5rem 0 .75rem;
}

h2 {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #888;
  margin: 2rem 0 .75rem;
  padding-bottom: .4rem;
  border-bottom: 1px solid #d4d4d4;
}

p { margin: .25rem 0 1rem; color: #444; font-size: .95rem; }

.meta { font-size: .9rem; color: #555; margin: .25rem 0 1.25rem; }

/* ── forms ───────────────────────────────────────────────────── */
label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #555;
  margin-top: 1.25rem;
}

input[type="text"],
input[type="email"],
input[type="datetime-local"],
textarea {
  display: block;
  width: 100%;
  margin-top: .35rem;
  padding: .65rem .8rem;
  background: #fff;
  border: 1.5px solid #ccc;
  color: #111;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}

input:focus, textarea:focus { border-color: #e10600; }

textarea { height: 8rem; resize: vertical; }

button, .btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: .7rem 1.75rem;
  background: #e10600;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  border: none;
  cursor: pointer;
  transition: background .15s;
  text-decoration: none;
}

button:hover, .btn:hover { background: #b50000; }

.btn-sm {
  padding: .3rem .75rem;
  font-size: .72rem;
  margin-top: 0;
}

/* ── alerts ──────────────────────────────────────────────────── */
.info, .error, .success, .warning {
  padding: .85rem 1rem;
  margin: 1rem 0;
  font-size: .9rem;
  border-left: 3px solid;
  background: #fff;
}

.info    { border-color: #3b82f6; }
.error   { border-color: #e10600; background: #fff8f8; }
.success { border-color: #10b981; background: #f0faf6; }
.warning { border-color: #f59e0b; background: #fffbf0; }

/* ── section divider ─────────────────────────────────────────── */
.section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #d4d4d4;
}

/* ── tables ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: .75rem 0; }

table { border-collapse: collapse; width: 100%; background: #fff; font-size: .85rem; }

th {
  background: #111;
  color: #fff;
  padding: .55rem .7rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  white-space: nowrap;
}

td {
  border-bottom: 1px solid #e8e8e8;
  padding: .5rem .7rem;
  white-space: nowrap;
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #f9f9f9; }

.pos-col {
  width: 2.5rem;
  text-align: center;
  font-weight: 800;
  color: #fff;
  background: #333 !important;
}

.cell { display: flex; align-items: center; gap: .4rem; }
.cell img { width: 28px; height: 28px; object-fit: cover; background: #efefef; flex-shrink: 0; }

/* ── drag list (predict page) ────────────────────────────────── */
.list { padding: 0; margin: .5rem 0 1.5rem; }

.bubble {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .85rem;
  margin: .3rem 0;
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-left: 3px solid #e10600;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: box-shadow .1s;
}

.bubble:active { cursor: grabbing; }
.sortable-ghost  { opacity: .35; background: #f5f5f5; }
.sortable-chosen { box-shadow: 0 4px 12px rgba(0,0,0,.12); border-left-color: #b50000; }

.pos {
  min-width: 1.8rem;
  text-align: center;
  font-weight: 800;
  font-size: .85rem;
  color: #e10600;
}

.bubble img { width: 40px; height: 40px; object-fit: cover; background: #efefef; }
.name { font-weight: 600; }

/* ── save status badge ───────────────────────────────────────── */
.status {
  position: fixed;
  top: 1rem; right: 1rem;
  padding: .4rem 1rem;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}

.status.saving { background: #f59e0b; color: #111; opacity: 1; }
.status.saved  { background: #10b981; color: #fff; opacity: 1; }
.status.error  { background: #e10600; color: #fff; opacity: 1; }

/* ── deadline note ───────────────────────────────────────────── */
.deadline-note {
  font-size: .85rem;
  color: #555;
  background: #fff;
  border-left: 3px solid #e10600;
  padding: .6rem 1rem;
  margin: .75rem 0 1.5rem;
}

/* ── url box ─────────────────────────────────────────────────── */
.url-box {
  background: #fff;
  border: 1.5px solid #e0e0e0;
  border-left: 3px solid #e10600;
  padding: .85rem 1rem;
  margin: .5rem 0 1rem;
  word-break: break-all;
  font-size: .9rem;
}

/* ── misc ────────────────────────────────────────────────────── */
.actions     { display: flex; gap: .5rem; align-items: center; }
.form-inline { margin: 0; }
