/* ═══════════════════════════════════════════════════════════════════
   TURN-IN  —  assignment-level submission flow on "What's Due"
   Reuses existing tokens (--red/--green/--amber/--off…) and the
   .ul-chip / .upload-area / .chip / .btn / modal vocabulary.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Due card: turn-in affordance + status ── */
.due-card.turnedin { border-left: 3px solid var(--green); }
.due-card .due-right { display: flex; align-items: center; gap: 10px; }

.ti-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
  padding: 4px 10px; border-radius: 7px;
}
.ti-status.done { background: var(--green-glow); color: var(--green); border: 1px solid rgba(21,128,61,.22); }
.ti-status.none { background: var(--off); color: var(--muted2); border: 1px solid var(--border); }
.ti-status i { font-size: 10px; }

.ti-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--red); background: var(--red); color: #fff;
  transition: background .12s, border-color .12s, transform .05s;
}
.ti-btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.ti-btn:active { transform: scale(.97); }
.ti-btn.ghost { background: #fff; color: var(--red); }
.ti-btn.ghost:hover { background: var(--red-glow); }
.ti-btn:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ── Turn-in modal body ── */
.ti-head-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: -4px 0 16px; font-size: 12.5px; color: var(--muted);
}
.ti-head-meta .ti-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-light); }

.ti-receipt {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--green-glow); border: 1px solid rgba(21,128,61,.2);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.ti-receipt .r-main { font-size: 13.5px; font-weight: 700; color: var(--green); display: flex; align-items: center; gap: 8px; }
.ti-receipt .r-sub { font-size: 11.5px; color: var(--muted2); display: flex; align-items: center; gap: 7px; }

.ti-section { margin-bottom: 18px; }
.ti-section .ti-label {
  font-size: 11px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 9px; display: flex; align-items: center; gap: 7px;
}
.ti-section .ti-label i { color: var(--red); font-size: 11px; }

/* link adder */
.ti-link-row { display: flex; gap: 8px; }
.ti-link-row .ti-in {
  flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; font-family: inherit; outline: none; transition: border-color .12s;
}
.ti-link-row .ti-in.title { flex: 0 0 34%; }
.ti-link-row .ti-in:focus { border-color: var(--red); }
.ti-add-link {
  flex-shrink: 0; padding: 0 13px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: var(--off); color: var(--muted2);
  font-family: inherit; font-size: 12.5px; font-weight: 700;
}
.ti-add-link:hover { border-color: var(--red); color: var(--red); background: var(--red-glow); }

/* upload area (matches existing .upload-area look) */
.ti-upload {
  border: 1.5px dashed var(--border-light); border-radius: 10px;
  padding: 18px; text-align: center; cursor: pointer; background: var(--card2);
  transition: border-color .12s, background .12s;
}
.ti-upload:hover, .ti-upload.drag { border-color: var(--red); background: var(--red-glow); }
.ti-upload i { font-size: 19px; color: var(--muted); margin-bottom: 6px; display: block; }
.ti-upload .u-main { font-size: 13px; font-weight: 600; color: var(--text); }
.ti-upload .u-sub { font-size: 11px; color: var(--muted); margin-top: 3px; }
.ti-upload:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.ti-note {
  width: 100%; min-height: 76px; resize: vertical; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: 9px; font-family: inherit; font-size: 13px;
  line-height: 1.5; outline: none; transition: border-color .12s;
}
.ti-note:focus { border-color: var(--red); }

.ti-empty-hint { font-size: 11.5px; color: var(--muted); font-style: italic; }

/* link chip variant (open icon) */
.ul-chip.link i { color: #1d4ed8; }
.ul-chip a.fn { color: var(--text); text-decoration: none; }
.ul-chip a.fn:hover { color: var(--red); text-decoration: underline; }

/* ── Teacher: turn-in attachments inside the student drawer ── */
.ti-drawer-att {
  margin: 2px 0 10px; padding: 10px 12px;
  background: var(--green-glow); border: 1px solid rgba(21,128,61,.16); border-radius: 9px;
}
.ti-drawer-att .ti-da-head {
  font-size: 11.5px; font-weight: 700; color: var(--green); display: flex; align-items: center; gap: 7px; margin-bottom: 8px;
}
.ti-drawer-att .ti-da-note {
  font-size: 12px; color: var(--muted2); line-height: 1.45; margin-top: 7px;
  padding-top: 7px; border-top: 1px dashed rgba(21,128,61,.2); white-space: pre-wrap;
}
.ti-att-link {
  display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px;
  background: #fff; border: 1px solid var(--border); font-size: 12.5px; font-weight: 600;
  color: var(--text); text-decoration: none; margin-bottom: 5px;
}
.ti-att-link:last-child { margin-bottom: 0; }
.ti-att-link:hover { border-color: var(--red); color: var(--red); }
.ti-att-link i { color: var(--muted2); font-size: 12px; }
.ti-att-link.link i { color: #1d4ed8; }

/* ── Teacher: turned-in-not-graded dot in the gradebook cell ── */
td[data-asgn] { position: relative; }
.gb-ti-dot {
  position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2px #fff; pointer-events: none;
}
.gb-ti-dot::after {
  content: "Turned in · not graded"; position: absolute; right: 0; top: 12px;
  background: var(--badge-bg); color: #fff; font-size: 10px; font-weight: 600;
  padding: 3px 7px; border-radius: 5px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .12s; z-index: 20;
}
td[data-asgn]:hover .gb-ti-dot::after { opacity: 1; }

/* ── Teacher: per-assignment submissions list ── */
.ti-sub-row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.ti-sub-row:last-child { border-bottom: none; }
.ti-sub-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ti-sub-who .avatar { width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ti-sub-who .nm { font-size: 13.5px; font-weight: 600; }
.ti-sub-who .stamp { font-size: 11px; color: var(--muted); }
.ti-sub-atts { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.ti-sub-grade { display: flex; align-items: center; gap: 7px; }
.ti-sub-grade input {
  width: 56px; text-align: center; padding: 7px 6px; border: 1px solid var(--border);
  border-radius: 7px; font-family: inherit; font-size: 13px; font-weight: 700; outline: none;
}
.ti-sub-grade input:focus { border-color: var(--red); }
.ti-sub-grade .of { font-size: 11px; color: var(--muted); }
.ti-sub-missing { font-size: 12.5px; color: var(--muted); font-style: italic; padding: 14px 0; }
