:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f3f7fb;
  background: #09131d;
  font-synthesis: none;
  --bg: #09131d;
  --panel: #0d1a26;
  --panel-2: #101f2d;
  --line: #304252;
  --muted: #9fb0c0;
  --text: #f3f7fb;
  --blue: #2d8cff;
  --blue-2: #1675e8;
  --blue-soft: #83baf7;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(41, 104, 160, .16), transparent 42%),
    linear-gradient(180deg, #0a1621 0%, #08121b 100%);
  color: var(--text);
}

button,
input,
textarea { font: inherit; }

.shell {
  max-width: 1180px;
  margin: auto;
  padding: 30px 24px 64px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brandmark {
  width: 38px;
  height: 38px;
  border: 1px solid #40566a;
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brandmark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand h1 {
  font-size: 18px;
  margin: 0;
}

.muted { color: var(--muted); }

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn {
  border: 1px solid #43586b;
  background: #162634;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  border-color: #4ca1ff;
  filter: brightness(1.08);
}

.btn.primary {
  background: linear-gradient(#3595ff, #1877e4);
  color: white;
  border-color: #4ca1ff;
  font-weight: 700;
}

.hero { padding: 22px 0 28px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  color: var(--blue-soft);
}

.hero h2 {
  font-size: clamp(30px, 5vw, 50px);
  line-height: 1.05;
  margin: 10px 0 12px;
  max-width: 760px;
}

.hero p {
  font-size: 17px;
  max-width: 680px;
  color: #bfd0df;
  line-height: 1.6;
}

.section { margin-top: 34px; }

.sectionhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.sectionhead h3 {
  font-size: 18px;
  margin: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  background: rgba(16, 31, 45, .78);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .18);
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid #3c5368;
  display: grid;
  place-items: center;
  overflow: hidden;
  font-weight: 800;
  color: var(--blue-soft);
}

.icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
}

.service-card h4 {
  font-size: 19px;
  margin: 16px 0 6px;
}

.service-card p {
  margin: 0;
  color: #aac0d4;
  line-height: 1.5;
  flex: 1;
}

.service-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.info-btn {
  width: 40px;
  min-width: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.media-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 14px;
}

.media-card { min-width: 0; }

.poster {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: #8093a5;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-title {
  font-weight: 700;
  margin-top: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  display: inline-flex;
  margin-top: 5px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-soft);
}

.announcement {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  margin-top: 8px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  background: rgba(16, 31, 45, .78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}

.login-card h1 {
  margin: 0 0 8px;
  font-size: 27px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 15px;
}

.field input,
.field textarea {
  background: var(--panel);
  color: var(--text);
  border: 1px solid #405366;
  border-radius: 9px;
  padding: 11px 12px;
  outline: none;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(45, 140, 255, .15);
}

.stack {
  display: grid;
  gap: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8093a5;
  margin: 18px 0;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}

.error {
  color: #ff9b9b;
  margin-top: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  display: grid;
  place-items: center;
  padding: 22px;
  z-index: 20;
}

.modal-card {
  width: min(560px, 100%);
  background: var(--panel-2);
  border: 1px solid #40566a;
  border-radius: 15px;
  padding: 24px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 24px;
}

.close {
  border: 0;
  background: transparent;
  color: #9fb0c0;
  font-size: 26px;
  cursor: pointer;
}

.admin-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #0b1722;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.empty {
  color: #8fa2b3;
  padding: 26px 0;
}

.footer {
  margin-top: 46px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #8093a5;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}

.hidden { display: none !important; }

@media (max-width: 760px) {
  .shell { padding: 22px 16px 46px; }
  .topbar { align-items: flex-start; }
  .actions .username { display: none; }
  .hero { padding-top: 10px; }
  .admin-grid { grid-template-columns: 1fr; }
  .media-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid { grid-template-columns: 1fr; }
  .footer { flex-direction: column; gap: 8px; }
}
