* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f9f9f9;
  color: #0f0f0f;
}
a { color: #cc0000; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
}
.topbar-logo { font-weight: 700; font-size: 20px; color: #cc0000; }
.topbar-logo span { color: #606060; font-weight: 400; font-size: 14px; margin-left: 6px; }
.topbar-user { font-size: 14px; color: #606060; }

.container { max-width: 1100px; margin: 24px auto; padding: 0 16px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 20px;
}
.card h2 { margin-top: 0; font-size: 18px; }
.hint { color: #606060; font-size: 13px; }

label { display: block; margin: 12px 0 4px; font-size: 13px; font-weight: 600; color: #333; }
input[type=text], input[type=password], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
}
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.checkbox-row input { width: auto; }

button, .link-danger {
  margin-top: 16px;
  background: #cc0000;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
button:hover, .link-danger:hover { background: #a80000; }
.link-danger { margin-top: 0; background: transparent; color: #cc0000; padding: 0; font-weight: 400; }
.link-danger:hover { background: transparent; text-decoration: underline; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #fdecea; color: #a80000; border: 1px solid #f5c6c0; }
.alert-success { background: #eaf7ea; color: #276b27; border: 1px solid #c6ecc6; }

.cat-list { list-style: none; padding: 0; margin: 8px 0 0; }
.cat-list li { padding: 6px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }

.video-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.video-table th, .video-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #f0f0f0; font-size: 14px; vertical-align: middle; }
.thumb { width: 96px; height: 54px; object-fit: cover; border-radius: 6px; background: #eee; }
.actions a, .actions button { margin-right: 12px; }

.badge { padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-on { background: #eaf7ea; color: #276b27; }
.badge-off { background: #f0f0f0; color: #777; }

.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f2f2f2; }
.login-box { background: #fff; padding: 32px; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,.08); width: 320px; }
.login-logo { color: #cc0000; font-size: 22px; font-weight: 700; text-align: center; }
.login-sub { text-align: center; color: #606060; margin: 4px 0 20px; font-size: 13px; }
