:root {
  --accent: #bad536;         /* lime */
  --accent-deep: #0b6b3a;    /* readable green for links/icons */
  --deep-green: #064c29;     /* brand dark */
  --cream: #fbfcf1;
  --text: #16281c;
  --text-2: #5f6e5a;
  --faint: #a7b3a0;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(6, 76, 41, 0.10);
  --shadow-sm: 0 6px 16px rgba(6, 76, 41, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(186, 213, 54, 0.22), transparent 60%),
    radial-gradient(700px 500px at -10% 30%, rgba(11, 107, 58, 0.16), transparent 60%),
    linear-gradient(160deg, #f6faee 0%, #eaf3df 45%, #f1f7e7 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 250px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.brand .mark {
  width: 44px; height: 44px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #0b6b3a, #064c29);
  box-shadow: 0 8px 18px rgba(6, 76, 41, 0.35);
  padding: 8px;
}
.brand .mark img { width: 100%; height: auto; display: block; }
.brand h1 { font-size: 18px; font-weight: 800; }
.brand span { font-size: 12px; color: var(--text-2); display: block; }

.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 14px;
  color: var(--text-2); font-weight: 600; font-size: 14px;
  transition: all .2s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.6); color: var(--text); }
.nav-link.active {
  background: linear-gradient(135deg, #c7e24a, #a6c22b);
  color: var(--text); box-shadow: var(--shadow-sm);
}
.nav-link .ico { font-size: 18px; }
.sidebar .spacer { flex: 1; }

.main { flex: 1; padding: 28px 34px; overflow-x: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 26px;
}
.topbar h2 { font-size: 24px; font-weight: 800; }
.topbar .sub { color: var(--text-2); font-size: 13px; }

/* ---------- Cards & stats ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.grid { display: grid; gap: 18px; }
.stats { grid-template-columns: repeat(3, 1fr); margin-bottom: 24px; }
.stat {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 20px 22px;
}
.stat .n { font-size: 30px; font-weight: 800; }
.stat .l { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.stat.accent { background: linear-gradient(135deg, #c7e24a, #a6c22b); }

/* ---------- Forms ---------- */
.form-row { margin-bottom: 18px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
input[type=text], input[type=password], textarea, select {
  width: 100%; padding: 13px 15px; font-size: 14px;
  border: 1px solid #e2ead4; border-radius: 13px;
  background: #f7faef; color: var(--text); outline: none;
  transition: border .2s, box-shadow .2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(186, 213, 54, 0.30);
}
textarea { min-height: 90px; resize: vertical; }

.file-drop {
  border: 2px dashed #cfe0b8; border-radius: 15px;
  padding: 22px; text-align: center; color: var(--text-2);
  background: #f7faef; cursor: pointer; transition: all .2s;
}
.file-drop:hover { border-color: var(--accent); background: #f6fbe9; }
.file-drop .fname { color: var(--accent-deep); font-weight: 600; margin-top: 6px; }
input[type=file] { display: none; }

.checkbox { display: flex; align-items: center; gap: 10px; }
.checkbox input { width: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border: none; border-radius: 14px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  background: linear-gradient(135deg, #c7e24a, #a6c22b);
  color: var(--text); box-shadow: 0 8px 18px rgba(11, 107, 58, 0.28);
  transition: transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }
.btn.danger { background: #fff; color: #e5484d; box-shadow: var(--shadow-sm); }
.btn.sm { padding: 8px 14px; font-size: 12.5px; }

/* ---------- Table / list ---------- */
.vid-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px; border-radius: 15px; background: #fff;
  box-shadow: var(--shadow-sm); margin-bottom: 12px;
}
.vid-row .thumb {
  width: 92px; height: 58px; border-radius: 11px; object-fit: cover;
  background: linear-gradient(135deg, #0b6b3a, #064c29);
  display: grid; place-items: center; color: #fff; font-size: 20px;
  flex-shrink: 0;
}
.vid-row .meta { flex: 1; min-width: 0; }
.vid-row .meta .t { font-weight: 700; font-size: 15px; }
.vid-row .meta .d {
  color: var(--text-2); font-size: 12.5px; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; background: #eef3e2; color: var(--text-2);
}
.tag.on { background: #e4f8ec; color: #1a9d55; }
.tag.off { background: #fdeef0; color: #e5484d; }
.actions { display: flex; gap: 8px; align-items: center; }

/* ---------- Flash ---------- */
.flash {
  padding: 13px 18px; border-radius: 13px; margin-bottom: 18px;
  font-size: 14px; font-weight: 600;
}
.flash.success { background: #e4f8ec; color: #1a9d55; }
.flash.error { background: #fdeef0; color: #e5484d; }

.empty { text-align: center; padding: 50px 20px; color: var(--text-2); }
.empty .big { font-size: 40px; margin-bottom: 10px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 400px; text-align: center; padding: 40px 34px; }
.login-card .mark {
  width: 84px; height: 84px; border-radius: 24px; margin: 0 auto 20px;
  display: grid; place-items: center; padding: 16px;
  background: linear-gradient(135deg, #0b6b3a, #064c29);
  box-shadow: 0 12px 24px rgba(6, 76, 41, 0.35);
}
.login-card .mark img { width: 100%; height: auto; display: block; }
.login-card h1 { font-size: 24px; font-weight: 800; }
.login-card p { color: var(--text-2); font-size: 14px; margin: 6px 0 26px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 6px; }
.login-card label { text-align: left; }
