* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Inter", "Segoe UI", sans-serif;
  background: #0b1021;
  color: #ffffff;
  padding: 24px 16px 60px;
}
.wrap { max-width: 640px; margin: 0 auto; }
.hidden { display: none !important; }

#loginScreen { max-width: 360px; margin: 60px auto 0; text-align: center; }
#loginScreen .mark img { width: 200px; height: auto; object-fit: contain; margin: 0 auto 18px; display: block; }
#loginScreen h1 { font-size: 20px; margin: 0 0 6px; }
#loginScreen p { color: #9ca3af; font-size: 13px; margin: 0 0 24px; }
#loginScreen input {
  width: 100%; background: #161b33; border: 1px solid #232a4d; color: #fff;
  border-radius: 8px; padding: 12px 14px; font-size: 16px; font-family: inherit; outline: none;
  margin-bottom: 12px; text-align: center; letter-spacing: 0.05em;
}
#loginScreen input:focus { border-color: #4ade80; }
#loginScreen button {
  width: 100%; background: #4ade80; color: #0b1021; font-weight: 700; font-size: 14px;
  border: none; border-radius: 8px; padding: 12px 16px; cursor: pointer;
}
#loginError { color: #f87171; font-size: 12.5px; margin-top: 12px; min-height: 16px; }

.header { text-align: center; margin-bottom: 18px; }
.header img.mark-img { height: 68px; width: auto; object-fit: contain; }
.subtitle { color: #6b7280; font-size: 13px; margin: 0 0 20px; display: flex; justify-content: space-between; align-items: center; }
.logout-link { color: #6b7280; font-size: 12px; text-decoration: underline; cursor: pointer; background: none; border: none; padding: 0; font-family: inherit; }

.legend { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center;
  font-size: 9.5px; color: #9ca3af; margin-bottom: 6px; text-transform: uppercase;
  font-weight: 700; letter-spacing: 0.04em; }
.legend-bar { display: flex; width: 100%; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 24px; }
.legend-bar span { flex: 1; }

.controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.row { display: flex; gap: 10px; }
input[type="text"] {
  background: #161b33; border: 1px solid #232a4d; color: #fff;
  border-radius: 8px; padding: 10px 38px 10px 12px; font-size: 16px; font-family: inherit;
  flex: 1; outline: none; width: 100%;
}
input[type="text"]:focus { border-color: #4ade80; }
button.action {
  background: #4ade80; color: #0b1021; font-weight: 700; font-size: 13px;
  border: none; border-radius: 8px; padding: 10px 16px; cursor: pointer; white-space: nowrap;
}
button:active { transform: scale(0.98); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #d1d5db; }
.toggle-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; }

.search-wrap { position: relative; flex: 1; }
.search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #6b7280; font-size: 18px; line-height: 1;
  cursor: pointer; padding: 4px; display: none;
}
.search-clear.visible { display: block; }

.status-msg { font-size: 13px; color: #9ca3af; padding: 14px 0; }
.status-msg.error { color: #f87171; }

.card {
  background: #161b33; border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
  border-left: 4px solid #9ca3af; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.card .meta { color: #9ca3af; font-size: 11px; font-family: "SFMono-Regular", Menlo, monospace; }

.date-heading {
  display: flex; align-items: center; gap: 10px;
  margin: 28px 0 12px; color: #6b7280; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.date-heading:first-child { margin-top: 0; }
.date-heading::after { content: ""; flex: 1; height: 1px; background: #232a4d; }
.card h3 { margin: 5px 0 0; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.right-col { display: flex; flex-direction: column; align-items: flex-end; flex-shrink: 0; width: 112px; }
.badge {
  padding: 6px 8px; border-radius: 6px; font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.02em; border: 1px solid;
  width: 100%; text-align: center; line-height: 1.3; white-space: normal;
}
.dl-btn {
  display: block; background: #4ade80; color: #0b1021; padding: 7px 10px; border-radius: 6px;
  text-decoration: none; font-weight: 800; font-size: 9.5px; width: 100%; text-align: center;
  margin-top: 8px; letter-spacing: 0.02em; border: none; cursor: pointer; font-family: inherit;
}
.alert { color: #f87171; font-size: 12px; font-weight: 600; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.08); flex-basis: 100%; }

.completed   { color: #4ade80; border-color: #4ade80; }
.processing  { color: #a855f7; border-color: #a855f7; }
.in-the-queue, .in-queue { color: #60a5fa; border-color: #60a5fa; }
.pending, .video-unavailable { color: #9ca3af; border-color: #9ca3af; }
.upcoming { color: #ffffff; border-color: #ffffff; }

.border-completed  { border-left-color: #4ade80; }
.border-processing { border-left-color: #a855f7; }
.border-in-the-queue, .border-in-queue { border-left-color: #60a5fa; }
.border-pending, .border-video-unavailable { border-left-color: #9ca3af; }
.border-upcoming { border-left-color: #ffffff; }

.note { font-size: 11.5px; color: #4b5568; margin-top: 30px; line-height: 1.6; text-align: center; }
.note a { color: #6b7280; }

.off-season { max-width: 320px; margin: 60px auto; text-align: center; }
.off-season p { color: #d1d5db; font-size: 15px; line-height: 1.6; }
.off-season strong { color: #4ade80; }

.report-popover {
  position: fixed; background: #1c2347; border: 2px solid #4ade80; border-radius: 10px;
  padding: 6px; display: flex; flex-direction: column; gap: 2px; z-index: 60;
  box-shadow: 0 6px 18px rgba(0,0,0,0.5);
}
.report-popover button {
  background: none; border: none; color: #fff; text-align: left; padding: 9px 12px;
  border-radius: 6px; font-size: 13px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.report-popover button:hover, .report-popover button:active { background: #232a4d; }
