/* Theme: maroon / gold / black. Layout optimized for 16:9 TV (1920x1080) */
:root {
  --maroon: #7B1113;
  --maroon-2: #5c0d0f;
  --gold: #D4AF37;
  --gold-soft: #F6E6B4;
  --black: #0f0a0a;
  --card-bg: rgba(75, 10, 12, 0.55);
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background: linear-gradient(180deg, var(--maroon), #0b0707);
  color: var(--gold-soft)
}

.screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px 28px;
  gap: 14px
}

/* header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px
}

.logoBox {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.45));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6)
}

.brandText .title {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px
}

.brandText .subtitle {
  font-size: 13px;
  color: var(--gold-soft);
  margin-top: 4px
}

.datetime {
  text-align: right
}

#nowDate {
  font-size: 16px
}

#nowTime {
  font-size: 36px;
  font-weight: 700
}

/* main grid */
.mainGrid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 18px;
  flex: 1;
  align-items: start
}

/* cards */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid rgba(212, 175, 55, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.cardHeader {
  font-size: 18px;
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 8px
}

.cardBody {
  flex: 1
}

.scrollY {
  overflow: auto
}

/* jadwal table */
.table {
  width: 100%;
  border-collapse: collapse;
  color: var(--gold-soft)
}

.table thead th {
  background: linear-gradient(90deg, var(--maroon-2), #8b1d1f);
  color: #fff;
  padding: 8px;
  text-align: left;
  font-weight: 700
}

.table td {
  padding: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 18px
}

.table tbody tr.today {
  background: #8b1d1f;
  color: #fff
}

/* perkembangan rows */
#perkGrid {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.perkRow {
  background: rgba(0, 0, 0, 0.06);
  padding: 10px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start
}

.perkLeft {
  flex: 1
}

.perkTitle {
  font-weight: 800
}

.perkMeta {
  font-size: 13px;
  color: var(--gold-soft);
  margin-top: 6px
}

.perkNote {
  margin-top: 6px;
  font-size: 13px
}

/* tahanan grid */
.tahananGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px
}

.tahananCard {
  background: rgba(0, 0, 0, 0.12);
  padding: 10px;
  border-radius: 8px
}

.tahananCard .name {
  font-weight: 800;
  font-size: 16px
}

.tahananCard .case {
  font-size: 13px;
  opacity: 0.95
}

.progress {
  height: 8px;
  background: #3b0a0b;
  border-radius: 6px;
  margin-top: 8px;
  overflow: hidden
}

.progress>i {
  display: block;
  height: 100%;
  background: var(--gold)
}

/* jaksa list */
#jaksaList {
  display: flex;
  flex-direction: column;
  gap: 8px
}

.jaksaItem {
  background: rgba(0, 0, 0, 0.06);
  padding: 8px;
  border-radius: 8px
}

.jaksaItem .k {
  font-weight: 800
}

/* footer */
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px
}

.ticker {
  width: 100%;
  background: var(--black);
  color: var(--gold);
  padding: 8px;
  border-radius: 8px;
  overflow: hidden;
  white-space: nowrap
}

.updated {
  color: var(--gold-soft);
  font-size: 13px
}

/* responsive / tv tweaks */
@media(max-width:1400px) {
  .mainGrid {
    grid-template-columns: 1fr 360px
  }

  #nowTime {
    font-size: 26px
  }
}

/* animation helpers for list/window swaps */
.anim-slide {
  transition: opacity 520ms ease, transform 520ms ease
}

.anim-out {
  opacity: 0;
  transform: translateY(-10px)
}

.anim-in {
  opacity: 1;
  transform: translateY(0)
}

/* ensure children don't overflow during transitions */
.cardBody>.anim-slide {
  will-change: transform, opacity
}