/* CCVOD Media admin */
:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #66726c;
  --line: #dfe6e2;
  --soft: #f5f8f6;
  --green: #176b4d;
  --green-dark: #0d4e37;
  --red: #a63535;
  --shadow: 0 18px 55px rgba(25, 50, 40, .1);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f8faf9;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand strong { font-size: 13px; letter-spacing: .13em; }
.mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #fff;
  background: var(--green);
  font-weight: 850;
}
nav { display: flex; align-items: center; gap: 17px; }
nav a, .text-button { padding: 0; border: 0; color: var(--muted); background: none; font-size: 14px; font-weight: 650; text-decoration: none; }
nav a:hover, .text-button:hover { color: var(--ink); }
.login-shell { display: grid; place-items: center; min-height: calc(100vh - 77px); padding: 40px 20px; }
.login-card { width: min(440px, 100%); padding: 34px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
h1, h2 { margin: 0; letter-spacing: -.045em; }
h1 { font-size: clamp(36px, 6vw, 54px); line-height: 1.05; }
h2 { font-size: 25px; }
.muted { margin: 14px 0 25px; color: var(--muted); line-height: 1.55; }
label { display: grid; gap: 7px; margin: 0 0 16px; }
label > span { color: #435049; font-size: 13px; font-weight: 720; }
input, textarea {
  width: 100%;
  border: 1px solid #cfd9d3;
  border-radius: 10px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
textarea { resize: vertical; }
input:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 107, 77, .12); }
.primary-button, .secondary-button, .danger-button {
  min-height: 43px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 750;
}
.primary-button { width: 100%; border: 1px solid var(--green); color: #fff; background: var(--green); }
.primary-button:hover { background: var(--green-dark); }
.primary-button:disabled { cursor: wait; opacity: .55; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.danger-button { min-height: 36px; border: 1px solid #efd3d3; color: var(--red); background: #fff8f8; font-size: 13px; }
.error { min-height: 19px; margin: 2px 0 12px; color: var(--red); font-size: 13px; }
.admin-shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 55px 0 80px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 30px; }
.page-heading .muted { margin-bottom: 0; }
.signed-in { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff; font-size: 12px; white-space: nowrap; }
.admin-grid { display: grid; grid-template-columns: minmax(340px, .8fr) minmax(440px, 1.2fr); align-items: start; gap: 20px; }
.panel { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 30px rgba(25, 50, 40, .05); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.file-picker {
  place-items: center;
  padding: 25px 16px;
  border: 1px dashed #aebdb5;
  border-radius: 13px;
  text-align: center;
  background: var(--soft);
  cursor: pointer;
}
.file-picker:hover { border-color: var(--green); }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-picker strong { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.file-picker small { color: var(--muted); line-height: 1.4; }
.file-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--green); background: #e4f2eb; font-size: 19px; }
.progress-wrap { margin: 16px 0; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
progress { width: 100%; height: 8px; border: 0; border-radius: 999px; overflow: hidden; }
progress::-webkit-progress-bar { background: #e7ede9; }
progress::-webkit-progress-value { background: var(--green); }
.file-list { display: grid; gap: 10px; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.file-row h3 { overflow: hidden; margin: 0 0 5px; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: 12px; }
.file-description { margin: 9px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.file-actions { display: flex; align-items: center; gap: 8px; }
.download-link { color: var(--green); font-size: 13px; font-weight: 750; text-decoration: none; }
.empty { padding: 45px 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); text-align: center; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  max-width: min(360px, calc(100vw - 44px));
  padding: 13px 16px;
  border-radius: 11px;
  color: #fff;
  background: #17211d;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 880px) {
  .admin-grid { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; }
}
@media (max-width: 560px) {
  .site-header { padding: 0 16px; }
  .brand strong { display: none; }
  .admin-shell { width: min(100% - 24px, 1160px); padding-top: 35px; }
  .page-heading { display: block; }
  .signed-in { display: inline-block; margin-top: 18px; }
  .panel { padding: 19px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .file-row { grid-template-columns: 1fr; }
  .file-actions { justify-content: space-between; }
}
