* { box-sizing: border-box; }
:root { color-scheme: dark; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #070a0f;
  color: #f5f5f5;
}
a { color: #5ed1ff; text-decoration: none; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: #0c1119;
}
.topbar h1 { margin: 0 0 4px; }
.topbar p { margin: 0; color: rgba(255,255,255,.58); }
.topbar nav { display: flex; gap: 12px; flex-wrap: wrap; }
.layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) 1fr;
  gap: 20px;
  padding: 20px;
}
.panel, .login-card {
  background: linear-gradient(135deg, #151b26, #0c1017);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.panel.single { width: min(720px, calc(100% - 32px)); margin: 40px auto; }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.login-card { width: min(420px, calc(100% - 32px)); }
label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  color: rgba(255,255,255,.76);
  font-weight: 700;
  font-size: 13px;
}
input, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.32);
  color: white;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
}
button, .mini {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
  background: #1677ff;
  color: white;
  margin-top: 16px;
}
button.danger {
  background: #d33;
  padding: 8px 10px;
  margin-top: 0;
}
.mini {
  background: rgba(255,255,255,.10);
  padding: 8px 10px;
}
.alert {
  padding: 12px 14px;
  border-radius: 14px;
  margin: 12px 0;
  font-weight: 700;
}
.alert.success { background: rgba(31, 211, 97, .15); color: #72ff9e; border: 1px solid rgba(31,211,97,.25); }
.alert.error { background: rgba(255, 70, 70, .15); color: #ff9a9a; border: 1px solid rgba(255,70,70,.25); }
.hint, .muted { color: rgba(255,255,255,.58); line-height: 1.5; }
.rules {
  margin-top: 22px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 16px;
}
pre {
  white-space: pre-wrap;
  background: rgba(0,0,0,.28);
  border-radius: 14px;
  padding: 14px;
  color: #b9e7ff;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
}
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  vertical-align: middle;
}
th { color: rgba(255,255,255,.55); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
td small { display:block; color: rgba(255,255,255,.48); margin-top: 3px; }
.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.actions form { margin: 0; }
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .topbar { align-items: flex-start; flex-direction: column; }
}


.upload-progress {
  margin: 16px 0 2px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.10);
}
.upload-progress.hidden { display: none; }
.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.progress-head span {
  color: rgba(255,255,255,.82);
  font-weight: 800;
}
.progress-head strong {
  color: #9ce2ff;
  font-variant-numeric: tabular-nums;
}
.progress-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0,0,0,.36);
  border: 1px solid rgba(255,255,255,.08);
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1677ff, #5ed1ff);
  transition: width .15s ease;
}
.upload-progress small {
  display: block;
  margin-top: 9px;
  color: rgba(255,255,255,.58);
}
.upload-progress.success .progress-fill {
  background: linear-gradient(90deg, #1fd361, #72ff9e);
}
.upload-progress.error .progress-fill {
  background: linear-gradient(90deg, #d33, #ff9a9a);
}
button:disabled,
input:disabled {
  opacity: .55;
  cursor: not-allowed;
}


.progress-fill {
  position: relative;
  overflow: hidden;
}
.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-100%);
  animation: progressShine 1.2s linear infinite;
}
@keyframes progressShine {
  to { transform: translateX(100%); }
}


.recovery-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 193, 7, .10);
  border: 1px solid rgba(255, 193, 7, .25);
}
.recovery-box h3 {
  margin: 0 0 6px;
}
.temp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.temp-row:first-of-type {
  border-top: 0;
}
.temp-row small {
  display: block;
  color: rgba(255,255,255,.55);
  margin-top: 3px;
}
.temp-row form {
  margin: 0;
}
.temp-row button {
  margin-top: 0;
  white-space: nowrap;
}
