/* ANCTVLIVE Broadcast Graphics - admin/control/client UI */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #0f1420;
  color: #e8ecf4;
}
a { color: #7db4ff; }
.muted { color: #93a0b8; }
code { background: #1c2434; padding: 2px 6px; border-radius: 4px; word-break: break-all; }

.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  background: #131b2c; border-bottom: 2px solid #ff2e63;
  padding: 10px 22px;
}
.brand a { color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; }
.brand span { color: #ff2e63; font-weight: 400; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.nav a { color: #b9c4d8; text-decoration: none; padding: 4px 8px; border-radius: 4px; }
.nav a.on, .nav a:hover { color: #fff; background: #223050; }
.nav .who { margin-left: auto; color: #93a0b8; font-size: 13px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 20px; }
.foot { text-align: center; color: #5b6578; font-size: 12px; padding: 18px; }

h1 { font-size: 26px; margin: 10px 0 16px; }
h2 { font-size: 19px; margin: 4px 0 12px; }

.card {
  background: #172032;
  border: 1px solid #263350;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.flash {
  background: #143c26; border: 1px solid #2e7d4f; color: #9fe6bb;
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px;
}
.flash.err { background: #451a1e; border-color: #a13b46; color: #ffb4bc; }

.form label { display: block; margin: 10px 0; font-size: 14px; color: #c4cede; }
.form input[type=text], .form input:not([type]), .form input[type=password],
.form input[type=number], .form input[type=date], .form input[type=url],
.form input[type=file], .form select, .form textarea {
  display: block; width: 100%; max-width: 520px;
  background: #0d1420; color: #e8ecf4;
  border: 1px solid #2c3a5c; border-radius: 6px;
  padding: 9px 10px; margin-top: 4px; font-size: 15px;
}
.form .cols { display: flex; gap: 18px; flex-wrap: wrap; }
.form .cols > label { flex: 1; min-width: 200px; }
.form .check { display: flex; align-items: center; gap: 8px; }
.form .check input { width: auto; }
.inline-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.inline-form label { margin: 0; }
.inline form, form.inline { display: inline; }

.btn {
  display: inline-block; background: #243354; color: #e8ecf4;
  border: 1px solid #35476f; border-radius: 6px;
  padding: 8px 16px; font-size: 14px; cursor: pointer; text-decoration: none;
}
.btn:hover { background: #2d4067; }
.btn.primary { background: #1d5fd1; border-color: #3d7be0; color: #fff; }
.btn.primary:hover { background: #2a6fe0; }
.btn.danger { background: #a12736; border-color: #c2434f; color: #fff; }
.btn.warn { background: #b26a00; border-color: #d18a1f; color: #fff; }
.btn.big { font-size: 17px; padding: 12px 22px; font-weight: 700; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.tbl { width: 100%; border-collapse: collapse; margin: 14px 0; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid #223050; vertical-align: top; }
.tbl th { color: #93a0b8; font-size: 13px; text-transform: uppercase; letter-spacing: .5px; }
.row-active { background: #14263f; }
.badge { background: #223050; border-radius: 12px; padding: 2px 10px; font-size: 12px; }
.badge.active { background: #14532d; color: #86efac; }
.badge.draft { background: #3b3f4c; }
.badge.archived { background: #4a2c14; color: #d8a173; }
.actions form { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.thumb { max-width: 120px; max-height: 60px; vertical-align: middle; background: #fff; border-radius: 4px; }

.loginbox { max-width: 400px; margin: 60px auto; }

.grid.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 30px; }
.stat span { color: #93a0b8; font-size: 13px; }

/* ---------- control panel ---------- */
.control-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.layer-section { margin-top: 26px; }
.layer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-bottom: 2px solid #263350; padding-bottom: 8px; }
.grid.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-top: 14px; }
.gcard { position: relative; text-align: center; border-width: 2px; }
.gcard.is-on { border-color: #2e7d4f; box-shadow: 0 0 0 2px #2e7d4f, 0 0 24px rgba(46, 125, 79, .45); }
.gcard .onair {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: #e11d48; color: #fff; font-weight: 800; font-size: 12px;
  letter-spacing: 1.5px; padding: 3px 12px; border-radius: 10px;
}
.gtype { color: #93a0b8; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.gprimary { font-size: 20px; font-weight: 700; margin: 6px 0 2px; }
.gsecondary { font-size: 15px; color: #9fd3ff; }
.gmeta { color: #6b7794; font-size: 12px; margin: 8px 0 12px; }

.bar { background: #223050; border-radius: 4px; height: 14px; position: relative; }
.bar > i { display: block; background: #1d5fd1; height: 100%; border-radius: 4px; }

@media (max-width: 700px) {
  .wrap { padding: 12px; }
  .btn.big { width: 100%; }
  .layer-head .btn { width: 100%; }
  .grid.cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 460px) {
  .grid.cards { grid-template-columns: 1fr; }
}
