/* Admin console */

.admin-body { background: #f4f7fc; min-height: 100vh; }
.admin-top {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.admin-top-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-top-right { display: flex; align-items: center; gap: 10px; }
.admin-chip {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em;
  background: var(--navy); color: #fff; padding: 6px 10px; border-radius: 6px;
}
.admin-main { padding: 42px 0 70px; }

/* Login */
.login-view { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 34px; align-items: stretch; min-height: 520px; }
.login-card {
  background: #fff; border: 1px solid var(--line); border-radius: 26px;
  padding: 42px; box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; justify-content: center;
}
.login-card h1 { font-size: 36px; letter-spacing: -0.04em; margin: 12px 0 10px; }
.login-card > p { color: var(--muted); font-size: 13.5px; line-height: 1.7; margin-bottom: 24px; }
.login-card .field { margin-bottom: 18px; }
.login-hint { font-size: 11px; color: #8b95a4; line-height: 1.7; margin-top: 18px; }
.login-hint code { background: #f2f5fa; border-radius: 5px; padding: 2px 6px; font-size: 10.5px; }
.login-art {
  border-radius: 26px; padding: 42px; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 85% 15%, rgba(240, 74, 36, 0.55), transparent 45%),
    linear-gradient(145deg, #0b1830, #16294a 75%);
  color: #fff; display: flex; align-items: center;
}
.login-art::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 60% 50%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 50%, #000, transparent 75%);
}
.login-art-inner { position: relative; z-index: 1; }
.login-art h2 { font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -0.04em; margin: 14px 0 26px; max-width: 420px; }
.login-art ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.login-art li { display: flex; align-items: center; gap: 13px; font-size: 13.5px; color: #c9d6e9; }
.login-art li span {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #ffb295;
}

/* Dashboard */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.dash-head h1 { font-size: 34px; letter-spacing: -0.04em; margin: 8px 0 6px; }
.dash-head p { color: var(--muted); font-size: 13px; }

.admin-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.admin-stat {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.admin-stat span { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #8b95a4; margin-bottom: 8px; }
.admin-stat strong { font-family: var(--font-display); font-size: 26px; letter-spacing: -0.03em; }
.admin-stat.accent strong { color: var(--orange); }
.admin-stat.green strong { color: var(--green); }

.admin-toolbar { display: flex; gap: 12px; margin-bottom: 14px; }
.admin-toolbar input, .admin-toolbar select {
  border: 1px solid #dbe2ec; border-radius: 11px; padding: 11px 14px;
  font-size: 12.5px; background: #fff; outline: none;
}
.admin-toolbar input { flex: 1; }
.admin-toolbar input:focus, .admin-toolbar select:focus { border-color: #ff9b7a; box-shadow: 0 0 0 4px rgba(240, 74, 36, 0.08); }

.table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  overflow: auto; box-shadow: var(--shadow-sm);
}
.admin-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.admin-table th {
  text-align: left; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #8b95a4; font-weight: 800; padding: 14px 16px;
  background: #f8fafd; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table td { padding: 14px 16px; font-size: 12.5px; border-bottom: 1px solid #f0f3f8; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fbfcfe; }
.student-cell strong { display: block; font-size: 13px; color: var(--ink); }
.student-cell small { color: #8b95a4; font-size: 11px; }
.cell-sub { color: #8b95a4; font-size: 11px; margin-top: 2px; }
.code-chip {
  font-family: ui-monospace, monospace; font-size: 10.5px;
  background: #f2f5fa; border-radius: 5px; padding: 2px 6px; color: #5d6a7e;
}
.table-empty { padding: 40px; text-align: center; color: #8b95a4; font-size: 13px; }
.row-btn {
  border: 1px solid #dbe2ec; background: #fff; border-radius: 9px;
  padding: 7px 12px; font-size: 11.5px; font-weight: 700; color: #33415c;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.row-btn:hover { border-color: #ffb295; color: var(--orange-dark); background: #fff8f4; }

.admin-foot { margin-top: 30px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; box-shadow: var(--shadow-sm); }
.admin-foot h3 { font-size: 16px; margin-bottom: 14px; }
.cred-list { display: grid; gap: 8px; }
.cred-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; padding: 9px 12px; background: #f8fafd; border-radius: 10px; }
.cred-row .cred-code { font-family: ui-monospace, monospace; font-weight: 700; color: var(--orange-dark); }
.cred-row a { color: var(--blue); font-weight: 700; font-size: 11.5px; }

/* Detail modal */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 16px; padding-right: 34px; }
.detail-head h2 { font-size: 24px; margin-bottom: 4px; }
.detail-head small { color: #8b95a4; font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; background: #f8fafd; border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.detail-item { font-size: 12px; color: #8b95a4; }
.detail-item strong { display: block; color: var(--ink); font-size: 12.5px; margin-top: 2px; }
.detail-block { background: #fff8f4; border: 1px solid #ffe1d4; border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.detail-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #a04a2b; margin-bottom: 6px; }
.detail-block p { font-size: 12.5px; color: #5d6a7e; line-height: 1.65; }
.detail-block a { color: var(--blue); font-weight: 700; word-break: break-all; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.detail-actions .btn { flex: 1; min-width: 160px; }
.detail-feedback { margin-bottom: 14px; }
.detail-feedback label { font-size: 11.5px; font-weight: 700; color: #475467; display: block; margin-bottom: 6px; }
.detail-feedback textarea {
  width: 100%; border: 1px solid #dbe2ec; border-radius: 11px;
  padding: 11px 13px; font-size: 12.5px; resize: vertical; min-height: 80px; outline: none;
}
.detail-feedback textarea:focus { border-color: #ff9b7a; box-shadow: 0 0 0 4px rgba(240, 74, 36, 0.08); }
.credential-box { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.credential-box a { font-size: 11.5px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 8px; padding: 9px 13px; }
.status-pill { font-size: 9.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 20px; white-space: nowrap; }

@media (max-width: 1020px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .login-view { grid-template-columns: 1fr; }
  .login-art { min-height: 300px; }
}
@media (max-width: 700px) {
  .admin-main { padding: 26px 0 50px; }
  .admin-chip { display: none; }
  .admin-top-right .btn-ghost { display: none; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-toolbar { flex-direction: column; }
  .login-card, .login-art { padding: 28px; }
  .dash-head { flex-direction: column; align-items: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
  .admin-top-inner { height: 64px; }
}

[hidden]{display:none!important}
.lms-admin{margin:2.5rem 0}.lms-admin h2{margin:0 0 1rem}.ops-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.ops-card,.lms-admin .card,.lms-admin .course-banner{background:#fff;border:1px solid #dae1e8;border-radius:12px;padding:1.25rem;margin-bottom:1rem;overflow-wrap:anywhere}.ops-card h3,.lms-admin h4{margin:0 0 .6rem}.lms-form,.ops-card label{display:grid;gap:.45rem}.lms-form{gap:.85rem;margin:.8rem 0}.ops-card label{font-weight:650}.ops-card input,.ops-card textarea,.ops-card select{box-sizing:border-box;padding:.65rem;width:100%;border:1px solid #acb9c6;border-radius:7px;background:white;font:inherit;color:#182a3d}.ops-card textarea{min-height:75px}.ops-card button{cursor:pointer}.lms-admin .secondary,.lms-admin .primary,.ops-control{background:#152a40;color:white;border:0;border-radius:7px;padding:.55rem .85rem;font:inherit;font-weight:650}.lms-admin .secondary,.ops-control{background:#e9eff4;color:#253a4f}.ops-line,.lms-admin .section-head,.lms-admin .row-actions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.6rem}.ops-line{padding:.65rem 0;border-bottom:1px solid #e4e9ed}.ops-line small{display:block}.lms-admin .course-banner{background:#172e48;color:white}.course-banner progress{display:block;width:100%;margin:.8rem 0}.lms-admin summary{cursor:pointer;font-weight:650}.lms-admin details,.lms-admin .attempt,.lms-admin .lesson{margin:.8rem 0}.lms-admin .tag{color:#18527a;background:#e5eef4;padding:.25rem .6rem;border-radius:15px;font-size:.875rem}.lms-admin .card p{white-space:pre-line}.lms-admin .card a{text-decoration:underline}.ops-card>.lms-form,.ops-card #lmsControls{margin:1rem 0}.ops-card button:disabled{opacity:.6}.ops-card small,.ops-card .subtle{color:#50657a}.course-banner small{color:#e1edf8}.ops-card h2{margin:.3rem 0}@media(max-width:680px){.ops-grid{grid-template-columns:1fr}}
