:root {
  --red: #ed1c24;
  --red2: #c9141b;
  --black: #141414;
  --ink: #222;
  --gray: #777;
  --line: #dedede;
  --bg: #f3f3f3;
  --white: #fff;
  --header-h: 72px;
  --shadow: 0 14px 40px rgba(0,0,0,.08)
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif
}

button, input, select, textarea {
  font: inherit
}

button {
  cursor: pointer
}

.topbar {
  height: 74px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 30px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50
}

.brand {
  width: 205px;
  display: flex;
  align-items: center;
  text-decoration: none
}

.brand img {
  width: 182px;
  max-height: 52px;
  object-fit: contain;
  object-position: left center
}

.brand-fallback {
  display: none;
  color: var(--red);
  font-size: 20px
}

.mainnav {
  display: flex;
  gap: 4px;
  flex: 1
}

.nav {
  border: 0;
  background: #fff;
  padding: 11px 13px;
  font-weight: 800;
  color: #666;
  border-radius: 7px;
  position: relative
}

.nav:hover, .nav.active {
  color: var(--red)
}

.nav.active:after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: -17px;
  height: 3px;
  background: var(--red)
}

.profile {
  display: flex;
  align-items: center;
  gap: 9px
}

.profile-dot, .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 900
}

.profile b, .profile span {
  display: block
}

.profile b {
  font-size: 11px
}

.profile span {
  font-size: 8px;
  color: #888
}

main {
  padding: 25px 32px 40px
}

.page {
  display: none
}

.page.active {
  display: block
}

.hero {
  min-height: 315px;
  background: #111;
  color: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,.15)
}

.hero:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--red)
}

.hero-copy {
  padding: 44px 52px;
  position: relative;
  z-index: 2
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 900;
  color: #ff5e64
}

.eyebrow.redtext {
  color: var(--red)
}

.hero h1 {
  font-size: 42px;
  line-height: 1.05;
  margin: 12px 0 14px;
  max-width: 700px
}

.hero p {
  max-width: 690px;
  color: #bbb;
  font-size: 13px;
  line-height: 1.65
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 24px
}

.hero-side {
  position: relative;
  background: linear-gradient(145deg,#191919,#262626);
  display: grid;
  place-items: center
}

.hero-side:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,.035) 1px,transparent 1px);
  background-size: 26px 26px
}

.template-status {
  position: relative;
  z-index: 2;
  border: 1px solid #444;
  border-radius: 12px;
  padding: 22px;
  width: 240px;
  background: #151515
}

.template-status span, .template-status small {
  display: block
}

.template-status span {
  font-size: 8px;
  letter-spacing: 1.4px;
  color: #888
}

.template-status strong {
  display: block;
  font-size: 32px;
  line-height: 1;
  color: var(--red);
  margin: 10px 0
}

.template-status small {
  font-size: 9px;
  color: #999;
  line-height: 1.5
}

.btn {
  border-radius: 8px;
  padding: 10px 13px;
  border: 1px solid transparent;
  font-weight: 850
}

.btn.red {
  background: var(--red);
  color: #fff
}

.btn.red:hover {
  background: var(--red2)
}

.btn.black {
  background: #292929;
  border-color: #444;
  color: #fff
}

.btn.ghost {
  background: #fff;
  border-color: #ccc;
  color: #333
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 12px;
  margin-top: 15px
}

.metrics article {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow)
}

.metrics span, .metrics small {
  display: block
}

.metrics span {
  font-size: 9px;
  text-transform: uppercase;
  color: #777;
  font-weight: 850
}

.metrics strong {
  display: block;
  font-size: 27px;
  margin: 4px 0
}

.metrics small {
  font-size: 8px;
  color: #999
}

.section-title, .page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  margin: 30px 0 15px
}

.section-title h2, .page-head h1 {
  margin: 5px 0
}

.section-title p, .page-head p {
  margin: 0;
  color: #777;
  font-size: 11px
}

.member-board {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 13px
}

.member-column {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow)
}

.member-head {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center
}

.member-profile {
  display: flex;
  align-items: center;
  gap: 9px
}

.member-profile h3 {
  margin: 0;
  font-size: 13px
}

.member-profile p {
  margin: 3px 0 0;
  color: #888;
  font-size: 8px
}

.member-count {
  font-size: 8px;
  font-weight: 900;
  color: #fff;
  background: var(--red);
  padding: 5px 7px;
  border-radius: 99px
}

.member-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line)
}

.member-stats div {
  padding: 9px 12px
}

.member-stats div+div {
  border-left: 1px solid var(--line)
}

.member-stats span {
  font-size: 7px;
  color: #888;
  text-transform: uppercase
}

.member-stats strong {
  display: block;
  margin-top: 3px;
  font-size: 16px
}

.project-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 9px;
  max-height: 340px;
  overflow: auto
}

.project-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 8px;
  padding: 9px
}

.project-card h4 {
  margin: 0;
  font-size: 10px;
  line-height: 1.35
}

.project-meta {
  font-size: 7px;
  color: #888;
  margin: 5px 0 8px
}

.project-top {
  display: flex;
  justify-content: space-between;
  gap: 5px
}

.status {
  font-size: 6px;
  border: 1px solid #bbb;
  border-radius: 3px;
  padding: 2px 3px;
  font-weight: 900
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  color: #777
}

.progress {
  height: 4px;
  background: #ddd;
  border-radius: 99px;
  overflow: hidden;
  margin-top: 4px
}

.progress span {
  display: block;
  height: 100%;
  background: var(--red)
}

.project-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 7px
}

.priority {
  font-size: 6px;
  color: #777;
  text-transform: uppercase;
  font-weight: 900
}

.mini-btn {
  border: 0;
  background: #111;
  color: #fff;
  border-radius: 4px;
  padding: 4px 5px;
  font-size: 6px;
  font-weight: 900
}

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 13px
}

.toolbar input {
  width: 320px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  background: #fff
}

.toolbar div {
  height: 1px;
  background: #ddd;
  flex: 1
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(195px,1fr));
  gap: 12px
}

.game-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: .18s
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: #aaa
}

.game-cover {
  height: 110px;
  background: #111;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden
}

.game-cover:before {
  content: "";
  position: absolute;
  width: 115px;
  height: 115px;
  border: 20px solid var(--red);
  left: -50px;
  bottom: -55px;
  transform: rotate(30deg)
}

.game-icon {
  font-size: 38px;
  color: #fff;
  position: relative;
  z-index: 2
}

.game-type {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  background: #fff;
  color: #111;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 900
}

.game-body {
  padding: 11px
}

.game-body h3 {
  margin: 0;
  font-size: 12px
}

.game-info {
  font-size: 8px;
  color: #888;
  line-height: 1.45;
  margin: 5px 0 9px
}

.game-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px
}

.game-actions button {
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 5px;
  padding: 6px 3px;
  font-size: 7px;
  font-weight: 850;
  color: #333
}

.game-actions button:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff
}

.template-card .game-cover {
  background: #1a1a1a
}

.template-card .game-icon {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--red)
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 13px
}

.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow)
}

.team-card h3 {
  margin: 10px 0 3px
}

.team-card p {
  margin: 0;
  font-size: 9px;
  color: #777
}

.team-card strong {
  display: block;
  margin-top: 15px
}

/* VS Code */
.vscode-shell {
  height: calc(100vh - 112px);
  min-height: 760px;
  display: grid;
  grid-template-columns: 48px 300px minmax(0,1fr);
  background: #1e1e1e;
  border: 1px solid #2b2b2b;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,.22)
}

.activity-bar {
  background: #181818;
  border-right: 1px solid #2b2b2b;
  display: flex;
  flex-direction: column
}

.activity {
  height: 46px;
  border: 0;
  background: transparent;
  color: #888;
  font-size: 20px;
  position: relative
}

.activity:hover, .activity.active {
  color: #fff
}

.activity.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 2px;
  background: var(--red)
}

.arduino-activity {
  font-weight: 900
}

.activity-spacer {
  flex: 1
}

.vscode-sidebar {
  background: #181818;
  color: #ccc;
  border-right: 1px solid #2b2b2b;
  overflow: auto;
  min-width: 0;
  font-size: 12px
}

.sidebar-title {
  height: 42px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  font-size: 9px;
  letter-spacing: 1px
}

.sidebar-title button {
  border: 0;
  background: transparent;
  color: #aaa;
  font-size: 13px
}

.sidebar-title button:hover {
  color: #fff
}

.game-picker {
  padding: 7px 9px 11px;
  border-bottom: 1px solid #2b2b2b
}

.game-picker span {
  display: block;
  font-size: 7px;
  color: #777;
  letter-spacing: 1px;
  margin-bottom: 5px
}

.game-picker select {
  width: 100%;
  background: #252526;
  color: #ddd;
  border: 1px solid #3c3c3c;
  padding: 7px;
  border-radius: 4px;
  font-size: 9px
}

.root-line {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  font-size: 9px
}

.file-tree {
  font-size: 12px
}

.tree-row {
  height: 29px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 7px;
  cursor: pointer;
  color: #c7c7c7;
  white-space: nowrap
}

.tree-row:hover {
  background: #252525
}

.tree-row.active {
  background: #37373d;
  color: #fff
}

.tree-row .arrow {
  width: 11px;
  text-align: center;
  color: #999
}

.tree-row .icon {
  width: 24px;
  text-align: center;
  font-size: 8px;
  font-weight: 800
}

.tree-row .name {
  overflow: hidden;
  text-overflow: ellipsis
}

.tree-children.hidden {
  display: none
}

.vscode-main {
  min-width: 0;
  display: grid;
  grid-template-rows: 38px 38px minmax(0,1fr) 38px auto 24px;
  background: #1e1e1e
}

.editor-tabs {
  background: #181818;
  display: flex;
  overflow: auto
}

.editor-tab {
  height: 38px;
  min-width: 125px;
  max-width: 210px;
  background: #181818;
  border-right: 1px solid #2b2b2b;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  font-size: 11px
}

.editor-tab.active {
  background: #1e1e1e;
  color: #fff;
  border-top: 1px solid var(--red)
}

.editor-tab .tab-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.tab-close {
  border: 0;
  background: transparent;
  color: #888;
  padding: 2px
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #2b2b2b;
  padding: 0 7px
}

.breadcrumbs {
  font-size: 8px;
  color: #858585;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.toolbar-actions {
  display: flex;
  gap: 4px
}

.toolbar-actions button {
  height: 27px;
  border: 1px solid #3b3b3b;
  background: #252526;
  color: #bbb;
  border-radius: 4px;
  padding: 0 9px;
  font-size: 9px
}

.toolbar-actions .save {
  background: var(--red);
  border-color: var(--red);
  color: #fff
}

.toolbar-actions .danger {
  background: #3a1c1c;
  border-color: #7b3030;
  color: #ffb0b0
}

.toolbar-actions .danger:hover {
  background: #5a2020;
  color: #fff
}

#monacoEditor {
  min-height: 0;
  width: 100%;
  height: 100%;
  font-size: 14px
}

.arduino-bar {
  height: 36px;
  background: #171717;
  border-top: 1px solid #303030;
  border-bottom: 1px solid #303030;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  color: #aaa
}

.arduino-label {
  font-size: 7px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: .8px
}

.arduino-bar input {
  height: 24px;
  width: 150px;
  background: #242424;
  color: #ddd;
  border: 1px solid #404040;
  border-radius: 3px;
  padding: 0 6px;
  font-size: 7px
}

.arduino-bar button {
  height: 24px;
  border: 1px solid #444;
  background: #252525;
  color: #ddd;
  border-radius: 3px;
  padding: 0 7px;
  font-size: 7px;
  font-weight: 800
}

.arduino-bar button.upload {
  background: var(--red);
  border-color: var(--red);
  color: #fff
}

#arduinoCliStatus {
  font-size: 7px;
  color: #777;
  white-space: nowrap
}

.arduino-console {
  margin: 0;
  max-height: 150px;
  overflow: auto;
  background: #101010;
  color: #ddd;
  border-bottom: 1px solid #333;
  padding: 9px;
  font: 10px/1.45 Consolas, monospace;
  white-space: pre-wrap
}

.arduino-console.hidden {
  display: none
}

.statusbar {
  height: 22px;
  background: #181818;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  font-size: 7px
}

.statusbar>div {
  display: flex;
  gap: 10px
}

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

.modal.hidden {
  display: none
}

.modal-card {
  width: min(570px,100%);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.25)
}

.modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 19px;
  border-bottom: 1px solid #ddd
}

.modal-top h3 {
  margin: 5px 0 0
}

.modal-x {
  border: 0;
  background: #fff;
  font-size: 23px
}

.modal form {
  padding: 19px
}

.modal label {
  display: grid;
  gap: 5px;
  font-size: 9px;
  font-weight: 850;
  margin-bottom: 11px
}

.modal input, .modal select {
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 9px
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px
}

.form-note {
  font-size: 9px;
  color: #777;
  background: #f6f6f6;
  border-left: 3px solid var(--red);
  padding: 9px
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 16px
}

.path-dialog {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(0,0,0,.58);
  display: grid;
  place-items: start center;
  padding-top: 14vh
}

.path-box {
  width: min(500px,calc(100vw - 30px));
  background: #252526;
  border: 1px solid #484848;
  box-shadow: 0 25px 70px rgba(0,0,0,.55);
  padding: 13px
}

.path-box label {
  display: block;
  color: #ddd;
  font-size: 9px;
  margin-bottom: 6px
}

.path-box input {
  width: 100%;
  background: #1e1e1e;
  color: #fff;
  border: 1px solid #555;
  padding: 8px
}

.path-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 9px
}

.path-actions button {
  border: 1px solid #555;
  background: #333;
  color: #ddd;
  padding: 6px 9px
}

.path-actions .confirm {
  background: var(--red);
  border-color: var(--red);
  color: #fff
}

@media(max-width:1200px) {
  .member-board {
    grid-template-columns: 1fr 1fr
  }
  .metrics {
    grid-template-columns: 1fr 1fr
  }
  .vscode-shell {
    grid-template-columns: 46px 260px minmax(0,1fr)
  }
}

@media(max-width:760px) {
  .topbar {
    padding: 0 12px;
    gap: 10px
  }
  .brand {
    width: 120px
  }
  .brand img {
    width: 115px
  }
  .profile {
    display: none
  }
  .mainnav {
    overflow: auto
  }
  .nav {
    white-space: nowrap;
    font-size: 10px
  }
  .hero {
    grid-template-columns: 1fr
  }
  .hero-side {
    display: none
  }
  .hero-copy {
    padding: 32px 25px
  }
  .hero h1 {
    font-size: 33px
  }
  main {
    padding: 16px 12px
  }
  .metrics, .member-board, .team-grid {
    grid-template-columns: 1fr
  }
  .project-cards {
    grid-template-columns: 1fr
  }
  .game-grid {
    grid-template-columns: repeat(2,minmax(0,1fr))
  }
  .vscode-shell {
    height: calc(100vh - 100px);
    min-height: 700px;
    grid-template-columns: 42px 1fr
  }
  .vscode-sidebar {
    display: none
  }
  .vscode-main {
    grid-column: 2
  }
  .arduino-bar {
    overflow: auto
  }
  .form-grid {
    grid-template-columns: 1fr
  }
}

.upload-dialog {
  position: fixed;
  inset: 0;
  z-index: 130;
  background: rgba(0,0,0,.62);
  display: grid;
  place-items: start center;
  padding-top: 12vh
}

.upload-box {
  width: min(560px,calc(100vw - 28px));
  background: #252526;
  border: 1px solid #4a4a4a;
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  padding: 16px;
  color: #ddd
}

.upload-box h3 {
  margin: 0 0 6px;
  font-size: 15px
}

.upload-box p {
  font-size: 10px;
  color: #999;
  line-height: 1.5;
  margin: 0 0 14px
}

.upload-box label {
  display: grid;
  gap: 6px;
  font-size: 10px;
  margin-bottom: 12px
}

.upload-box input[type=text] {
  background: #1e1e1e;
  color: #fff;
  border: 1px solid #555;
  padding: 9px;
  border-radius: 3px
}

.upload-files {
  max-height: 180px;
  overflow: auto;
  background: #1b1b1b;
  border: 1px solid #3b3b3b;
  padding: 8px;
  font: 10px/1.5 Consolas, monospace;
  color: #bbb
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 13px
}

.upload-actions button {
  border: 1px solid #555;
  background: #333;
  color: #ddd;
  padding: 7px 11px;
  border-radius: 3px
}

.upload-actions .confirm {
  background: var(--red);
  border-color: var(--red);
  color: #fff
}

/* Permanent game delete */
.game-actions .delete-game-action {
  grid-column: 1 / -1;
  background: #fff;
  color: #b71319;
  border-color: #d9a1a3;
}

.game-actions .delete-game-action:hover {
  background: #b71319;
  border-color: #b71319;
  color: #fff;
}

/* FULL VS CODE MODE */
body.files-mode {
  overflow: hidden;
  background: #1e1e1e
}

body.files-mode main {
  padding: 0
}

body.files-mode #page-files {
  display: block;
  height: calc(100vh - 74px);
  margin: 0;
  padding: 0
}

body.files-mode .topbar {
  box-shadow: 0 1px 0 #252525;
}

body.files-mode #page-files .vscode-shell {
  height: 100%;
  min-height: 0;
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.files-mode .vscode-sidebar {
  font-size: 13px
}

body.files-mode .file-tree {
  font-size: 12px
}

body.files-mode .tree-row {
  height: 30px
}

body.files-mode .vscode-shell {
  grid-template-columns: 48px 310px minmax(0,1fr);
}

body.files-mode .vscode-main {
  grid-template-rows: 40px 42px minmax(0,1fr) 40px auto 24px;
}

body.files-mode .editor-tab {
  height: 40px;
  min-width: 140px;
  font-size: 11px
}

body.files-mode .editor-toolbar {
  padding: 0 10px
}

body.files-mode .breadcrumbs {
  font-size: 10px
}

body.files-mode .toolbar-actions button {
  height: 29px;
  font-size: 9px;
  padding: 0 10px
}

body.files-mode .arduino-bar {
  height: 40px
}

body.files-mode .statusbar {
  height: 24px;
  font-size: 8px
}

/* editor stage */
.editor-stage {
  position: relative;
  min-height: 0;
  background: #1e1e1e
}

.editor-stage #monacoEditor {
  position: absolute;
  inset: 0
}

.editor-stage #monacoEditor.hidden {
  display: none
}

/* binary media viewer */
.media-viewer {
  position: absolute;
  inset: 0;
  background: #1e1e1e;
  color: #ddd;
  overflow: auto;
  padding: 30px;
  display: grid;
  place-items: center
}

.media-viewer.hidden {
  display: none
}

.media-inner {
  width: min(100%,1100px);
  min-height: 70%;
  display: grid;
  grid-template-rows: minmax(0,1fr) auto;
  border: 1px solid #353535;
  background: #181818;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.4)
}

#mediaContent {
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 26px;
  background: linear-gradient(45deg,#202020 25%,transparent 25%), linear-gradient(-45deg,#202020 25%,transparent 25%), linear-gradient(45deg,transparent 75%,#202020 75%), linear-gradient(-45deg,transparent 75%,#202020 75%), #191919;
  background-size: 22px 22px;
  background-position: 0 0, 0 11px, 11px -11px, -11px 0
}

#mediaContent img {
  max-width: 100%;
  max-height: 68vh;
  object-fit: contain;
  box-shadow: 0 10px 34px rgba(0,0,0,.35)
}

#mediaContent video {
  max-width: 100%;
  max-height: 68vh;
  background: #000
}

#mediaContent audio {
  width: min(680px,90%)
}

.media-generic {
  text-align: center;
  border: 1px dashed #555;
  padding: 36px;
  border-radius: 8px;
  color: #999
}

.media-generic strong {
  display: block;
  color: #fff;
  font-size: 18px;
  margin-bottom: 8px
}

.media-meta {
  min-height: 52px;
  border-top: 1px solid #333;
  background: #202020;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  font-size: 10px
}

.media-meta strong {
  color: #fff
}

.media-meta span {
  color: #888;
  flex: 1
}

.media-meta a {
  color: #ff696e;
  text-decoration: none;
  font-weight: 800
}

.media-meta a:hover {
  text-decoration: underline
}

/* preview button */
.toolbar-actions .preview-action {
  background: #11351d;
  border-color: #256c39;
  color: #9ee7af
}

.toolbar-actions .preview-action:hover {
  background: #194b29;
  color: #fff
}

/* professional notifications */
.toast-host {
  position: fixed;
  top: 88px;
  right: 18px;
  z-index: 200;
  display: grid;
  gap: 9px;
  width: min(390px,calc(100vw - 36px));
  pointer-events: none
}

.toast {
  pointer-events: auto;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-left: 4px solid #333;
  border-radius: 8px;
  padding: 12px 13px;
  box-shadow: 0 18px 46px rgba(0,0,0,.18);
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 9px;
  align-items: start;
  animation: toastIn .2s ease
}

.toast.success {
  border-left-color: #18864b
}

.toast.error {
  border-left-color: #b71319
}

.toast.info {
  border-left-color: #444
}

.toast-icon {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1c1c1c;
  color: #fff;
  font-size: 11px;
  font-weight: 900
}

.toast.success .toast-icon {
  background: #18864b
}

.toast.error .toast-icon {
  background: #b71319
}

.toast-copy b {
  display: block;
  font-size: 11px;
  color: #222
}

.toast-copy span {
  display: block;
  font-size: 9px;
  color: #777;
  line-height: 1.45;
  margin-top: 3px
}

.toast-close {
  border: 0;
  background: transparent;
  color: #999;
  padding: 0;
  font-size: 15px
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px)
  }
  to {
    opacity: 1;
    transform: none
  }
}

.pro-dialog {
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(0,0,0,.58);
  display: grid;
  place-items: center;
  padding: 18px;
  backdrop-filter: blur(3px)
}

.pro-dialog.hidden {
  display: none
}

.pro-dialog-card {
  width: min(520px,100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0,0,0,.34);
  padding: 20px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 13px
}

.pro-dialog-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: #171717;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900
}

.pro-dialog-copy h3 {
  margin: 0 0 7px;
  font-size: 16px
}

.pro-dialog-copy p {
  margin: 0;
  color: #666;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-line
}

.pro-dialog-copy label {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  font-size: 9px;
  font-weight: 850
}

.pro-dialog-copy label.hidden {
  display: none
}

.pro-dialog-copy input {
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 9px
}

.pro-dialog-actions {
  grid-column: 1/-1;
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-top: 4px
}

@media(max-width:820px) {
  body.files-mode #page-files {
    height: calc(100vh - 74px)
  }
  body.files-mode .vscode-shell {
    grid-template-columns: 42px minmax(0,1fr)
  }
  body.files-mode .vscode-sidebar {
    display: none
  }
  .toolbar-actions {
    overflow-x: auto;
    max-width: 70%
  }
  .toolbar-actions button {
    white-space: nowrap
  }
}

body.files-mode .topbar {
  display: flex
}

body.files-mode #page-files {
  height: calc(100vh - 74px)
}

body.files-mode main {
  height: calc(100vh - 74px)
}

@media(max-width:820px) {
  body.files-mode #page-files {
    height: calc(100vh - 74px)
  }
}

/* Game validity / access window */
.game-card {
  position: relative
}

.game-validity {
  margin: 8px 0 10px;
  border: 1px solid #dedede;
  border-radius: 7px;
  background: #f7f7f7;
  padding: 8px 9px
}

.game-validity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px
}

.validity-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  padding: 4px 7px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .5px;
  text-transform: uppercase;
  border: 1px solid #bdbdbd;
  background: #fff;
  color: #444
}

.validity-status:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #555
}

.validity-status.active {
  border-color: #9cc8aa;
  color: #166338;
  background: #f4fbf6
}

.validity-status.active:before {
  background: #18864b
}

.validity-status.expired {
  border-color: #d5a1a3;
  color: #a31218;
  background: #fff
}

.validity-status.expired:before {
  background: #ed1c24
}

.validity-status.scheduled {
  border-color: #bdbdbd;
  color: #333;
  background: #fff
}

.validity-status.scheduled:before {
  background: #222
}

.game-validity .validity-label {
  font-size: 7px;
  color: #888;
  text-transform: uppercase;
  font-weight: 900
}

.game-validity-dates {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: center
}

.game-validity-dates div {
  min-width: 0
}

.game-validity-dates small {
  display: block;
  font-size: 6px;
  color: #999;
  text-transform: uppercase;
  font-weight: 800
}

.game-validity-dates b {
  display: block;
  font-size: 8px;
  margin-top: 2px;
  color: #222;
  white-space: nowrap
}

.game-validity-dates .arrow {
  font-size: 9px;
  color: #999
}

.game-card.expired-card {
  border-color: #c7c7c7
}

.game-card.expired-card .game-cover {
  filter: grayscale(.75);
  opacity: .78
}

.game-card.expired-card:after {
  content: "EXPIRED";
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 5;
  background: #ed1c24;
  color: #fff;
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .8px
}

.game-card.scheduled-card .game-cover {
  filter: grayscale(.35)
}

.game-actions button.preview-locked {
  background: #ececec;
  color: #999;
  border-color: #d6d6d6
}

.game-actions button.preview-locked:hover {
  background: #e6e6e6;
  color: #777;
  border-color: #ccc
}

.game-actions .validity-edit-action {
  grid-column: 1/-1;
  background: #171717;
  color: #fff;
  border-color: #171717
}

.game-actions .validity-edit-action:hover {
  background: #333;
  border-color: #333
}

.validity-modal-card {
  width: min(600px,100%)
}

.validity-game-summary {
  border: 1px solid #ddd;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 11px 12px;
  margin-bottom: 14px;
  background: #f8f8f8
}

.validity-game-summary span {
  display: block;
  font-size: 7px;
  color: #888;
  font-weight: 900;
  letter-spacing: .8px
}

.validity-game-summary strong {
  display: block;
  font-size: 14px;
  margin: 4px 0
}

.validity-game-summary small {
  font-size: 9px;
  color: #666
}

.expiry-summary-toast {
  font-weight: 700
}

/* VS Code-like Explorer context menu */
.explorer-context-menu {
  position: fixed;
  z-index: 260;
  width: 230px;
  background: #252526;
  border: 1px solid #454545;
  border-radius: 5px;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  padding: 5px;
  color: #ddd;
  font-size: 11px
}

.explorer-context-menu .context-path {
  padding: 7px 8px 8px;
  color: #777;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #3a3a3a;
  margin-bottom: 4px
}

.explorer-context-menu button {
  width: 100%;
  height: 31px;
  border: 0;
  background: transparent;
  color: #ddd;
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  padding: 0 9px;
  border-radius: 3px;
  font-size: 10px
}

.explorer-context-menu button span {
  width: 14px;
  text-align: center;
  color: #999
}

.explorer-context-menu button:hover {
  background: #3a3d41;
  color: #fff
}

.explorer-context-menu button.danger {
  color: #ffb4b7
}

.explorer-context-menu button.danger:hover {
  background: #8f171c;
  color: #fff
}

/* v7: keep main navigation visible in Game Files */
body.files-mode .topbar {
  display: flex !important;
  position: sticky;
  top: 0;
  z-index: 300;
}

body.files-mode main {
  height: calc(100vh - 74px);
  padding: 0;
}

body.files-mode #page-files {
  height: calc(100vh - 74px);
}

body.files-mode #page-files .vscode-shell {
  height: 100%;
}

/* v8 production workflow */
.page-head-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end
}

.library-toolbar {
  display: grid;
  grid-template-columns: minmax(240px,1fr) 150px 190px;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: var(--shadow)
}

.library-toolbar input, .library-toolbar select {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 10px
}

.game-library-groups {
  display: grid;
  gap: 22px
}

.month-section {
  display: grid;
  gap: 10px
}

.month-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #d7d7d7;
  padding: 0 2px 9px
}

.month-heading .month-marker {
  width: 5px;
  height: 28px;
  background: var(--red);
  border-radius: 99px
}

.month-heading h2 {
  margin: 0;
  font-size: 16px
}

.month-heading p {
  margin: 2px 0 0;
  color: #888;
  font-size: 9px
}

.month-count {
  margin-left: auto;
  background: #181818;
  color: #fff;
  border-radius: 99px;
  padding: 5px 8px;
  font-size: 8px;
  font-weight: 900
}

.month-game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
  gap: 12px
}

.master-library-section {
  display: grid;
  grid-template-columns: minmax(260px,340px) 1fr;
  gap: 12px;
  align-items: stretch
}

.master-library-info {
  background: #111;
  color: #fff;
  border-radius: 11px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center
}

.master-library-info h3 {
  margin: 6px 0;
  font-size: 18px
}

.master-library-info p {
  margin: 0;
  color: #999;
  font-size: 10px;
  line-height: 1.55
}

.game-type-chip {
  display: inline-flex;
  background: #111;
  color: #fff;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 900;
  text-transform: uppercase;
  margin-top: 6px
}

.game-actions .sync-action {
  background: #fff6f6;
  border-color: #e7aeb0;
  color: #a31218
}

.game-actions .sync-action:hover {
  background: #ed1c24;
  border-color: #ed1c24;
  color: #fff
}

.game-actions .data-action {
  background: #f6f6f6
}

.empty-month {
  border: 1px dashed #bbb;
  background: #fafafa;
  border-radius: 10px;
  padding: 28px;
  text-align: center;
  color: #888;
  font-size: 10px
}

/* analytics */
.analytics-panel {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 18px;
  margin-top: 28px;
  box-shadow: var(--shadow)
}

.analytics-copy h2 {
  margin: 6px 0 6px;
  font-size: 18px
}

.analytics-copy p {
  margin: 0;
  color: #777;
  font-size: 10px;
  line-height: 1.5
}

.top-game-type {
  margin-top: 18px;
  background: #111;
  color: #fff;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 12px
}

.top-game-type span {
  display: block;
  font-size: 7px;
  color: #888;
  text-transform: uppercase;
  font-weight: 900
}

.top-game-type strong {
  display: block;
  font-size: 18px;
  margin: 4px 0
}

.top-game-type small {
  color: #aaa;
  font-size: 8px
}

.game-type-chart {
  display: grid;
  gap: 9px;
  align-content: center
}

.type-bar-row {
  display: grid;
  grid-template-columns: 125px minmax(100px,1fr) 105px;
  gap: 10px;
  align-items: center
}

.type-bar-label {
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.type-bar-track {
  height: 9px;
  background: #e1e1e1;
  border-radius: 99px;
  overflow: hidden
}

.type-bar-track span {
  display: block;
  height: 100%;
  background: var(--red);
  border-radius: 99px;
  min-width: 3px
}

.type-bar-value {
  font-size: 8px;
  color: #777;
  text-align: right
}

.type-bar-value b {
  color: #222
}

/* master types */
.master-modal-card {
  width: min(620px,100%)
}

.inline-master-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid #ddd
}

.inline-master-form input {
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 9px
}

.master-list {
  padding: 10px 16px 18px;
  display: grid;
  gap: 6px;
  max-height: 390px;
  overflow: auto
}

.master-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 9px 10px
}

.master-row div {
  min-width: 0
}

.master-row b {
  display: block;
  font-size: 10px
}

.master-row small {
  color: #888;
  font-size: 7px
}

.master-row button {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 8px;
  font-weight: 800
}

/* team edit */
.team-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start
}

.team-card .team-card-actions {
  display: flex;
  gap: 5px;
  margin-top: 12px;
  width: 100%
}

.team-card .team-card-actions button {
  flex: 1;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 6px;
  padding: 7px;
  font-size: 8px;
  font-weight: 850
}

.team-card .team-card-actions button:hover {
  background: #111;
  color: #fff;
  border-color: #111
}

/* zip sync */
.zip-sync-card {
  width: min(610px,100%)
}

.zip-sync-body {
  padding: 18px
}

.zip-sync-warning {
  border-left: 4px solid var(--red);
  background: #f7f7f7;
  border-radius: 7px;
  padding: 12px
}

.zip-sync-warning b, .zip-sync-warning span {
  display: block
}

.zip-sync-warning b {
  font-size: 13px
}

.zip-sync-warning span {
  font-size: 9px;
  color: #666;
  line-height: 1.5;
  margin-top: 5px
}

.zip-file-card {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 11px;
  margin-top: 12px
}

.zip-file-card strong {
  font-size: 10px
}

.zip-file-card span {
  font-size: 9px;
  color: #777
}

.zip-progress {
  margin-top: 16px
}

.zip-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  margin-bottom: 6px;
  color: #777
}

.zip-progress-track {
  height: 8px;
  background: #ddd;
  border-radius: 99px;
  overflow: hidden
}

.zip-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width .15s
}

.form-note strong {
  color: #222
}

@media(max-width:900px) {
  .library-toolbar {
    grid-template-columns: 1fr 1fr
  }
  .library-toolbar input {
    grid-column: 1/-1
  }
  .analytics-panel {
    grid-template-columns: 1fr
  }
  .type-bar-row {
    grid-template-columns: 100px 1fr 85px
  }
  .master-library-section {
    grid-template-columns: 1fr
  }
}

@media(max-width:600px) {
  .library-toolbar {
    grid-template-columns: 1fr
  }
  .library-toolbar input {
    grid-column: auto
  }
  .page-head-actions {
    justify-content: flex-start
  }
  .type-bar-row {
    grid-template-columns: 85px 1fr
  }
  .type-bar-value {
    display: none
  }
}

/* ============================================================
v9 — Executive management dashboard
============================================================ */
.executive-metrics article {
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease
}

.executive-metrics article:after {
  content: "";
  position: absolute;
  width: 72px;
  height: 72px;
  border: 14px solid rgba(237,28,36,.05);
  border-radius: 50%;
  right: -28px;
  bottom: -30px
}

.executive-metrics article:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(0,0,0,.10);
  border-color: #c7c7c7
}

/* programmer monitoring */
.member-board {
  grid-template-columns: repeat(3,minmax(0,1fr));
  align-items: start
}

.member-column.monitor-card {
  border: 1px solid #d8d8d8;
  border-top: 4px solid #1a1a1a;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease
}

.member-column.monitor-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(0,0,0,.11);
  border-color: #bbb
}

.member-column.monitor-card.has-pending {
  border-top-color: var(--red)
}

.member-column.monitor-card.all-done {
  border-top-color: #18864b
}

.programmer-overview {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  border-bottom: 1px solid var(--line)
}

.programmer-overview>div {
  padding: 11px 12px;
  text-align: center
}

.programmer-overview>div+div {
  border-left: 1px solid var(--line)
}

.programmer-overview span {
  display: block;
  font-size: 7px;
  color: #888;
  text-transform: uppercase;
  font-weight: 900;
  letter-spacing: .4px
}

.programmer-overview strong {
  display: block;
  font-size: 21px;
  margin-top: 3px
}

.programmer-overview .done strong {
  color: #18864b
}

.programmer-overview .pending strong {
  color: var(--red)
}

.completion-block {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line)
}

.completion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 8px;
  color: #777;
  margin-bottom: 6px
}

.completion-head strong {
  font-size: 10px;
  color: #222
}

.completion-track {
  height: 7px;
  background: #e1e1e1;
  border-radius: 99px;
  overflow: hidden
}

.completion-track span {
  display: block;
  height: 100%;
  background: #18864b;
  border-radius: 99px
}

.monitor-section {
  padding: 10px
}

.monitor-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
  font-size: 8px;
  text-transform: uppercase;
  font-weight: 900;
  color: #666
}

.monitor-section-title b {
  color: #222
}

.monitor-game-list {
  display: grid;
  gap: 6px
}

.monitor-game {
  border: 1px solid #ddd;
  border-radius: 7px;
  padding: 8px;
  background: #fafafa;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
  align-items: center
}

.monitor-game:hover {
  background: #fff;
  border-color: #bbb
}

.monitor-game b {
  display: block;
  font-size: 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.monitor-game small {
  display: block;
  margin-top: 3px;
  color: #888;
  font-size: 7px
}

.monitor-game .monitor-status {
  border-radius: 99px;
  padding: 4px 6px;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap
}

.monitor-status.done {
  background: #eef8f1;
  color: #15713d;
  border: 1px solid #9dceb0
}

.monitor-status.pending {
  background: #fff2f2;
  color: #b71319;
  border: 1px solid #e0a7aa
}

.monitor-empty {
  border: 1px dashed #ccc;
  border-radius: 7px;
  padding: 11px;
  text-align: center;
  color: #888;
  font-size: 8px;
  background: #fafafa
}

.programmer-alert {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff3f3;
  border: 1px solid #efb7b9;
  color: #a31218;
  padding: 7px 9px;
  border-radius: 6px;
  margin: 10px;
  font-size: 8px;
  font-weight: 800
}

.programmer-clear {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f2faf4;
  border: 1px solid #afd6bc;
  color: #17643a;
  padding: 7px 9px;
  border-radius: 6px;
  margin: 10px;
  font-size: 8px;
  font-weight: 800
}

/* ============================================================
Interactive Game Library Cards
============================================================ */
.month-game-grid .game-card {
  isolation: isolate;
  transform: translateZ(0);
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s ease, border-color .22s ease
}

.month-game-grid .game-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 48px rgba(0,0,0,.14);
  border-color: #b7b7b7
}

.month-game-grid .game-card .game-cover {
  height: 132px;
  transition: transform .22s ease, filter .22s ease
}

.month-game-grid .game-card:hover .game-cover {
  filter: brightness(1.08)
}

.month-game-grid .game-card .game-cover:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg,transparent 20%,rgba(255,255,255,.10) 45%,transparent 70%);
  transform: translateX(-120%);
  transition: transform .55s ease
}

.month-game-grid .game-card:hover .game-cover:after {
  transform: translateX(120%)
}

.game-name-icon {
  position: relative;
  z-index: 2;
  color: #fff;
  font-size: 18px;
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -.3px;
  text-align: center;
  padding: 0 20px;
  max-width: 100%;
  text-shadow: 0 4px 18px rgba(0,0,0,.45);
  word-break: break-word
}

.game-name-icon:after {
  content: "";
  display: block;
  width: 38px;
  height: 3px;
  background: var(--red);
  border-radius: 99px;
  margin: 9px auto 0;
  transition: width .22s ease
}

.game-card:hover .game-name-icon:after {
  width: 72px
}

.game-body h3 {
  font-size: 14px;
  margin-bottom: 2px
}

.game-type-chip {
  transition: background .18s ease, transform .18s ease
}

.game-card:hover .game-type-chip {
  background: var(--red);
  transform: translateY(-1px)
}

.game-actions button {
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease
}

.game-actions button:active {
  transform: scale(.97)
}

/* search result feedback */
.library-result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -5px 0 12px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 9px;
  color: #777
}

.library-result-summary b {
  color: #222
}

.library-result-summary .clear-library-filter {
  border: 0;
  background: #111;
  color: #fff;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 8px;
  font-weight: 800
}

@media(max-width:1100px) {
  .member-board {
    grid-template-columns: 1fr 1fr
  }
}

@media(max-width:720px) {
  .member-board {
    grid-template-columns: 1fr
  }
  .programmer-overview {
    grid-template-columns: repeat(3,1fr)
  }
}

.member-column.monitor-card.no-work {
  border-top-color: #9a9a9a
}

.programmer-neutral {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f6f6f6;
  border: 1px solid #d7d7d7;
  color: #666;
  padding: 7px 9px;
  border-radius: 6px;
  margin: 10px;
  font-size: 8px;
  font-weight: 800
}

/* ============================================================
v10 Analytics & Reports
============================================================ */
.analytics-page-head {
  margin-top: 5px
}

.report-filter-bar {
  position: sticky;
  top: 86px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 11px;
  padding: 11px 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,.07);
  margin-bottom: 14px
}

.report-filter-group, .report-filter-actions {
  display: flex;
  gap: 7px;
  align-items: end;
  flex-wrap: wrap
}

.report-filter-group label {
  display: grid;
  gap: 4px;
  font-size: 7px;
  color: #777;
  font-weight: 900;
  text-transform: uppercase
}

.report-filter-group select {
  min-width: 135px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  padding: 8px;
  font-size: 9px
}

.report-filter-actions .btn {
  padding: 8px 10px;
  font-size: 8px
}

.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 10px;
  margin-bottom: 12px
}

.analytics-kpis article {
  background: #fff;
  border: 1px solid #ddd;
  border-top: 3px solid #111;
  border-radius: 9px;
  padding: 13px;
  box-shadow: 0 10px 28px rgba(0,0,0,.05);
  min-width: 0
}

.analytics-kpis article:nth-child(3), .analytics-kpis article:nth-child(4) {
  border-top-color: var(--red)
}

.analytics-kpis span, .analytics-kpis small {
  display: block
}

.analytics-kpis span {
  font-size: 7px;
  color: #777;
  font-weight: 900;
  text-transform: uppercase
}

.analytics-kpis strong {
  display: block;
  font-size: 22px;
  margin: 5px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.analytics-kpis small {
  font-size: 7px;
  color: #999;
  line-height: 1.4
}

.analytics-grid-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.analytics-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 11px;
  padding: 15px;
  box-shadow: 0 12px 34px rgba(0,0,0,.06);
  margin-bottom: 12px
}

.analytics-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px
}

.analytics-card-head h2 {
  font-size: 16px;
  margin: 5px 0 3px
}

.analytics-card-head p {
  margin: 0;
  color: #888;
  font-size: 8px
}

.report-bars {
  display: grid;
  gap: 9px
}

.report-bar-row {
  display: grid;
  grid-template-columns: 130px minmax(80px,1fr) 80px;
  gap: 9px;
  align-items: center
}

.report-bar-label {
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.report-bar-track {
  height: 10px;
  background: #ececec;
  border-radius: 99px;
  overflow: hidden
}

.report-bar-track span {
  display: block;
  height: 100%;
  background: #171717;
  border-radius: 99px;
  transition: width .35s ease
}

.report-bar-row.top .report-bar-track span {
  background: var(--red)
}

.report-bar-value {
  text-align: right;
  font-size: 8px;
  color: #777
}

.report-bar-value b {
  color: #222;
  font-size: 10px
}

.trend-head {
  align-items: center
}

.trend-year-label {
  font-size: 26px;
  font-weight: 950;
  color: #ddd
}

.monthly-trend-chart {
  display: grid;
  grid-template-columns: repeat(12,minmax(55px,1fr));
  gap: 7px;
  align-items: end;
  min-height: 245px;
  padding: 16px 4px 0;
  border-top: 1px solid #eee
}

.month-trend-item {
  display: grid;
  grid-template-rows: minmax(130px,1fr) auto;
  gap: 7px;
  min-width: 0
}

.month-bar-area {
  height: 160px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative
}

.month-bar {
  width: min(34px,75%);
  min-height: 3px;
  background: #1c1c1c;
  border-radius: 5px 5px 2px 2px;
  transition: height .35s ease, background .18s ease;
  position: relative
}

.month-bar.hot {
  background: var(--red)
}

.month-bar:hover {
  background: #ed1c24
}

.month-bar-count {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  font-weight: 900;
  color: #222
}

.month-trend-meta {
  text-align: center;
  min-width: 0
}

.month-trend-meta b {
  display: block;
  font-size: 7px;
  text-transform: uppercase
}

.month-trend-meta span {
  display: block;
  font-size: 6px;
  color: #999;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.report-table-wrap {
  overflow: auto;
  border: 1px solid #e2e2e2;
  border-radius: 8px
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px
}

.report-table th, .report-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  white-space: nowrap
}

.report-table th {
  background: #f6f6f6;
  font-size: 7px;
  text-transform: uppercase;
  color: #777;
  position: sticky;
  top: 0
}

.report-table tbody tr:hover {
  background: #fafafa
}

.table-progress {
  width: 90px;
  height: 5px;
  background: #ddd;
  border-radius: 99px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px
}

.table-progress span {
  display: block;
  height: 100%;
  background: #18864b
}

/* Workload programmer remains compact: lists are popups */
.monitor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px
}

.monitor-actions button {
  border: 1px solid #d0d0d0;
  background: #fff;
  border-radius: 7px;
  padding: 9px 7px;
  font-size: 8px;
  font-weight: 850;
  transition: .16s
}

.monitor-actions button:hover {
  background: #111;
  color: #fff;
  border-color: #111
}

.monitor-actions button.pending-list {
  border-color: #e1aaac;
  color: #a31218
}

.monitor-actions button.pending-list:hover {
  background: #a31218;
  color: #fff
}

.workload-list-modal {
  width: min(720px,100%)
}

.workload-list-summary {
  padding: 12px 17px;
  background: #f7f7f7;
  border-bottom: 1px solid #ddd;
  font-size: 9px;
  color: #666
}

.workload-popup-list {
  padding: 12px 16px 18px;
  display: grid;
  gap: 7px;
  max-height: 60vh;
  overflow: auto
}

.workload-popup-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  background: #fff
}

.workload-popup-row:hover {
  border-color: #bbb;
  background: #fafafa
}

.workload-popup-row h4 {
  margin: 0;
  font-size: 10px
}

.workload-popup-row p {
  margin: 3px 0 0;
  color: #888;
  font-size: 7px
}

.workload-popup-date {
  font-size: 8px;
  color: #666;
  text-align: right
}

.workload-popup-status {
  border-radius: 99px;
  padding: 4px 7px;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase
}

.workload-popup-status.done {
  background: #eef8f1;
  color: #15713d;
  border: 1px solid #9dceb0
}

.workload-popup-status.pending {
  background: #fff2f2;
  color: #b71319;
  border: 1px solid #e0a7aa
}

/* monthly/yearly productivity in programmer cards */
.programmer-period-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #ddd;
  background: #fafafa
}

.programmer-period-stats div {
  padding: 9px 11px
}

.programmer-period-stats div+div {
  border-left: 1px solid #ddd
}

.programmer-period-stats span {
  display: block;
  font-size: 6px;
  text-transform: uppercase;
  color: #888;
  font-weight: 900
}

.programmer-period-stats strong {
  display: block;
  font-size: 14px;
  margin-top: 3px
}

/* remove old long inline monitoring sections from visual influence */
.monitor-section.compact-hidden {
  display: none
}

@media(max-width:1150px) {
  .analytics-kpis {
    grid-template-columns: repeat(3,1fr)
  }
  .analytics-grid-main {
    grid-template-columns: 1fr
  }
  .monthly-trend-chart {
    overflow-x: auto;
    grid-template-columns: repeat(12,70px);
    padding-bottom: 7px
  }
}

@media(max-width:760px) {
  .report-filter-bar {
    position: static;
    align-items: stretch;
    flex-direction: column
  }
  .report-filter-group, .report-filter-actions {
    width: 100%
  }
  .analytics-kpis {
    grid-template-columns: 1fr 1fr
  }
  .report-bar-row {
    grid-template-columns: 95px 1fr 55px
  }
  .workload-popup-row {
    grid-template-columns: 1fr
  }
  .workload-popup-date {
    text-align: left
  }
}

/* ============================================================
v11 Multi Master Game Library
============================================================ */
.master-shelf-section {
  margin-bottom: 16px;
  background: #111;
  color: #fff;
  border-radius: 13px;
  border: 1px solid #282828;
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(0,0,0,.13)
}

.master-shelf-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 17px 12px;
  border-bottom: 1px solid #2c2c2c
}

.master-shelf-head h2 {
  margin: 5px 0 3px;
  font-size: 18px
}

.master-shelf-head p {
  margin: 0;
  color: #888;
  font-size: 9px
}

.master-shelf-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap
}

.master-scroll-btn {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid #444;
  background: #202020;
  color: #fff;
  font-size: 22px;
  line-height: 1
}

.master-scroll-btn:hover {
  background: #333
}

.master-horizontal-scroll {
  display: flex;
  gap: 11px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 13px 16px 17px;
  scroll-snap-type: x proximity;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #555 #1a1a1a
}

.master-horizontal-scroll::-webkit-scrollbar {
  height: 8px
}

.master-horizontal-scroll::-webkit-scrollbar-track {
  background: #181818
}

.master-horizontal-scroll::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 99px
}

.master-card {
  flex: 0 0 275px;
  scroll-snap-align: start;
  background: #1b1b1b;
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease
}

.master-card:hover {
  transform: translateY(-4px);
  border-color: #666;
  box-shadow: 0 18px 36px rgba(0,0,0,.3)
}

.master-card-cover {
  height: 100px;
  background: linear-gradient(140deg,#171717,#292929);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden
}

.master-card-cover:before {
  content: "";
  position: absolute;
  width: 100px;
  height: 100px;
  border: 17px solid var(--red);
  border-radius: 50%;
  right: -45px;
  bottom: -58px;
  opacity: .9
}

.master-card-cover:after {
  content: "MASTER";
  position: absolute;
  left: 10px;
  top: 9px;
  font-size: 6px;
  letter-spacing: 1px;
  font-weight: 900;
  color: #999
}

.master-card-name {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  font-size: 15px;
  line-height: 1.15;
  font-weight: 950;
  text-shadow: 0 5px 20px #000
}

.master-card-body {
  padding: 11px
}

.master-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 9px
}

.master-card-meta div {
  background: #202020;
  border: 1px solid #303030;
  border-radius: 6px;
  padding: 7px
}

.master-card-meta span {
  display: block;
  font-size: 6px;
  color: #777;
  text-transform: uppercase;
  font-weight: 900
}

.master-card-meta b {
  display: block;
  font-size: 9px;
  color: #ddd;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.master-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px
}

.master-card-actions button {
  border: 1px solid #414141;
  background: #222;
  color: #ccc;
  border-radius: 5px;
  padding: 7px 5px;
  font-size: 7px;
  font-weight: 850
}

.master-card-actions button:hover {
  background: #fff;
  color: #111;
  border-color: #fff
}

.master-card-actions .master-update {
  grid-column: auto;
  align-self: start;
  white-space: nowrap;
  background: #301719;
  border-color: #6d292d;
  color: #ffb9bb
}

.master-card-actions .master-update:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff
}

.master-empty {
  min-width: 100%;
  border: 1px dashed #444;
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  color: #777;
  font-size: 9px
}

/* no longer render the old template master card in monthly library */
.master-library-section {
  display: none!important
}

.master-upload-card {
  width: min(610px,100%)
}

.master-upload-info {
  border-left: 4px solid var(--red);
  background: #f6f6f6;
  border-radius: 7px;
  padding: 10px 11px;
  font-size: 9px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 13px
}

#masterGameForm>label {
  display: grid;
  gap: 6px;
  font-size: 9px;
  font-weight: 850;
  margin: 0 0 12px
}

#masterGameForm>label input {
  border: 1px solid #ccc;
  border-radius: 7px;
  padding: 9px;
  background: #fff
}

@media(max-width:760px) {
  .master-shelf-head {
    align-items: flex-start;
    flex-direction: column
  }
  .master-shelf-actions {
    width: 100%
  }
  .master-card {
    flex-basis: 250px
  }
}

#masterNameLabel.hidden {
  display: none!important
}

/* ============================================================
v12 Secure Portal + PIC + refined analytics
============================================================ */
.role-hidden {
  display: none!important
}

.logged-out>.topbar, .logged-out>main {
  display: none!important
}

.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #111;
  display: grid;
  place-items: center;
  padding: 24px
}

.login-screen.hidden {
  display: none
}

.login-card {
  width: min(430px,100%);
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 30px 90px #0008;
  border-top: 5px solid var(--red)
}

.login-card img {
  width: 150px;
  max-height: 48px;
  object-fit: contain;
  object-position: left;
  margin-bottom: 24px
}

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

.login-card p {
  color: #777;
  font-size: 10px;
  line-height: 1.5;
  margin-bottom: 20px
}

.login-card form {
  display: grid;
  gap: 12px
}

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 9px;
  font-weight: 850
}

.login-card input {
  padding: 11px;
  border: 1px solid #ccc;
  border-radius: 7px
}

.login-card .btn {
  height: 42px
}

.login-message {
  min-height: 20px;
  margin-top: 12px;
  color: #b71319;
  font-size: 9px;
  font-weight: 800
}

.profile-wrap {
  position: relative
}

.profile {
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left
}

.profile-chevron {
  font-size: 10px;
  color: #888
}

.profile-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 500;
  width: 170px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 18px 50px #0002;
  padding: 5px
}

.profile-menu.hidden {
  display: none
}

.profile-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px;
  border-radius: 5px;
  font-size: 9px
}

.profile-menu button:hover {
  background: #111;
  color: #fff
}

/* Overview = one horizontal executive strip */
#page-dashboard .hero {
  min-height: 150px;
  padding: 20px 24px
}

#page-dashboard .hero-copy h1 {
  font-size: 28px;
  max-width: 760px
}

#page-dashboard .hero-side {
  min-width: 190px
}

.executive-metrics {
  margin-top: 10px;
  margin-bottom: 14px
}

.executive-metrics article {
  padding: 11px
}

.executive-metrics strong {
  font-size: 24px
}

.programmer-section-title {
  margin-top: 10px
}

.programmer-scroll-actions {
  display: flex;
  gap: 5px
}

.programmer-scroll-actions button {
  width: 34px;
  height: 34px;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 7px;
  font-size: 20px
}

.programmer-scroll-actions button:hover {
  background: #111;
  color: #fff
}

.member-board {
  display: flex!important;
  grid-template-columns: none!important;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 12px;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity
}

.member-board .monitor-card {
  flex: 0 0 300px;
  scroll-snap-align: start
}

.programmer-overview strong {
  font-size: 18px
}

.completion-block {
  padding: 8px 11px
}

.programmer-period-stats div {
  padding: 7px 10px
}

.monitor-actions {
  padding: 8px
}

.monitor-actions button {
  padding: 7px
}

/* Master search */
.master-search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #1b1b1b;
  border: 1px solid #3a3a3a;
  border-radius: 7px;
  padding: 4px 7px
}

.master-search-wrap input {
  width: 180px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 9px
}

.master-search-wrap span {
  font-size: 7px;
  color: #888;
  white-space: nowrap
}

/* PIC */
.pic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
  gap: 10px
}

.pic-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: 46px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  box-shadow: 0 10px 26px #0000000a
}

.pic-avatar {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 12px
}

.pic-card-copy {
  min-width: 0
}

.pic-card-copy h3 {
  margin: 0;
  font-size: 12px
}

.pic-card-copy p, .pic-card-copy small {
  display: block;
  margin: 3px 0 0;
  color: #888;
  font-size: 8px
}

.pic-card-actions {
  grid-column: 1/-1;
  display: flex;
  gap: 6px
}

.pic-card-actions button {
  flex: 1;
  border: 1px solid #ccc;
  background: #fff;
  padding: 7px;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 850
}

.pic-card-actions .danger {
  color: #b71319
}

.pic-card-actions button:hover {
  background: #111;
  color: #fff
}

.account-line {
  display: block;
  color: #777;
  margin-top: 6px;
  font-size: 8px
}

.team-card-actions .danger {
  color: #b71319
}

.member-modal-actions {
  align-items: center
}

.modal-spacer {
  flex: 1
}

.btn.danger {
  background: #fff;
  color: #b71319;
  border: 1px solid #d7a3a5
}

/* Professional Analytics */
.analytics-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: end;
  background: #111;
  color: #fff;
  border-radius: 14px;
  padding: 23px 25px;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative
}

.analytics-hero:after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  border: 38px solid #ed1c24;
  border-radius: 50%;
  right: -110px;
  top: -130px;
  opacity: .8
}

.analytics-hero>div {
  position: relative;
  z-index: 2
}

.analytics-hero h1 {
  font-size: 30px;
  margin: 7px 0
}

.analytics-hero p {
  color: #999;
  font-size: 10px;
  max-width: 720px
}

.analytics-hero-mark {
  text-align: right
}

.analytics-hero-mark span {
  display: block;
  font-size: 7px;
  color: #888;
  letter-spacing: 1px
}

.analytics-hero-mark strong {
  font-size: 17px
}

.analytics-kpis {
  grid-template-columns: repeat(4,minmax(0,1fr))
}

.analytics-card {
  border-radius: 12px;
  box-shadow: 0 14px 34px #0000000b
}

.report-bar-row:hover .report-bar-track span {
  background: var(--red)
}

.report-table tbody tr {
  transition: background .15s
}

.table-action {
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 7px;
  font-weight: 800
}

.table-action:hover {
  background: #111;
  color: #fff
}

.pic-history-card {
  border-top: 3px solid var(--red)
}

@media(max-width:800px) {
  .analytics-kpis {
    grid-template-columns: 1fr 1fr
  }
  .analytics-hero {
    grid-template-columns: 1fr
  }
  .analytics-hero-mark {
    text-align: left
  }
  .master-search-wrap {
    width: 100%
  }
  .master-search-wrap input {
    width: 100%
  }
}

/* ============================================================
v12.1 Multi Administrator
============================================================ */
.admin-access-section {
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 13px;
  padding: 0 16px 16px;
  box-shadow: 0 14px 34px rgba(0,0,0,.06)
}

.admin-access-head {
  margin-bottom: 10px
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
  gap: 10px
}

.admin-card {
  position: relative;
  background: #111;
  color: #fff;
  border: 1px solid #292929;
  border-radius: 10px;
  padding: 14px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease
}

.admin-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 17px 40px rgba(0,0,0,.2);
  border-color: #555
}

.admin-card:after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border: 15px solid rgba(237,28,36,.32);
  border-radius: 50%;
  right: -42px;
  bottom: -48px;
  pointer-events: none
}

.admin-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1
}

.admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 950
}

.admin-card-copy {
  min-width: 0
}

.admin-card-copy h3 {
  margin: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.admin-card-copy p {
  margin: 3px 0 0;
  color: #999;
  font-size: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.admin-card-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 12px
}

.admin-card-meta div {
  background: #1b1b1b;
  border: 1px solid #2c2c2c;
  border-radius: 6px;
  padding: 7px
}

.admin-card-meta span {
  display: block;
  font-size: 6px;
  color: #777;
  text-transform: uppercase;
  font-weight: 900
}

.admin-card-meta b {
  display: block;
  margin-top: 3px;
  font-size: 8px;
  color: #ddd
}

.admin-current-badge {
  display: inline-flex;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  background: #153922;
  color: #9ae5b2;
  border: 1px solid #28683f;
  border-radius: 99px;
  padding: 4px 7px;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase
}

.admin-card-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 6px;
  margin-top: 11px
}

.admin-card-actions button {
  flex: 1;
  border: 1px solid #444;
  background: #202020;
  color: #ddd;
  border-radius: 6px;
  padding: 8px;
  font-size: 8px;
  font-weight: 850
}

.admin-card-actions button:hover {
  background: #fff;
  color: #111;
  border-color: #fff
}

.admin-card-actions button.danger {
  color: #ffb0b4;
  border-color: #653336
}

.admin-card-actions button.danger:hover {
  background: #b71319;
  border-color: #b71319;
  color: #fff
}

.admin-card-actions button[disabled] {
  opacity: .45;
  cursor: not-allowed
}

.admin-card-actions button[disabled]:hover {
  background: #202020;
  color: #ddd;
  border-color: #444
}

.team-divider {
  height: 1px;
  background: #ddd;
  margin: 24px 0
}

.admin-modal-card {
  width: min(570px,100%)
}

.admin-security-note {
  border-left: 4px solid var(--red);
  background: #f6f6f6;
  border-radius: 7px;
  color: #666;
  font-size: 8px;
  line-height: 1.5;
  padding: 9px 10px;
  margin: 3px 0 13px
}

.admin-empty {
  border: 1px dashed #444;
  background: #171717;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 9px
}

@media(max-width:760px) {
  .admin-access-section {
    padding: 0 10px 12px
  }
  .admin-grid {
    grid-template-columns: 1fr
  }
}

/* ============================================================
v12.3 — LINUX MINIMAL HEADER
Simple like the original portal, with Linux-desktop micro motion
============================================================ */
body {
  font-family: "Ubuntu", "Noto Sans", "DejaVu Sans", "Segoe UI", Arial, sans-serif;
}

/* top panel */
.linux-topbar {
  height: var(--header-h);
  padding: 0 20px;
  gap: 18px;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid #dedede;
  box-shadow: 0 5px 18px rgba(0,0,0,.045);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 300;
}

/* very small red system line; no decorative HUD */
.linux-topbar:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: var(--red);
}

.linux-topbar:after {
  display: none
}

/* logo + app title */
.linux-brand-wrap {
  min-width: 205px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.linux-brand-wrap .brand {
  width: 128px;
  min-width: 128px;
  display: flex;
  align-items: center;
}

.linux-brand-wrap .brand img {
  width: 100px;
  max-height: 38px;
  object-fit: contain;
  object-position: left center;
}

.linux-app-name {
  padding-left: 10px;
  border-left: 1px solid #ddd;
  color: #8b8b8b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* workspace-like navigation */
.linux-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.linux-nav::-webkit-scrollbar {
  display: none
}

.linux-nav .nav {
  position: relative;
  height: 38px;
  border: 0;
  background: transparent;
  color: #777;
  border-radius: 8px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05px;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, transform .18s cubic-bezier(.2,.8,.2,1);
}

/* workspace dot/line */
.linux-nav .nav:before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--red);
  transform: translateX(-50%);
  transition: width .22s cubic-bezier(.2,.8,.2,1);
}

.linux-nav .nav:after {
  display: none
}

.linux-nav .nav:hover {
  color: #111;
  background: #f3f3f3;
  transform: translateY(-1px);
}

.linux-nav .nav:hover:before {
  width: 12px
}

.linux-nav .nav.active {
  color: #111;
  background: #f1f1f1;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px #e2e2e2;
}

.linux-nav .nav.active:before {
  width: 28px
}

/* subtle Linux-style selected workspace breathing */
.linux-nav .nav.active {
  animation: linuxWorkspaceIn .28s ease both;
}

@keyframes linuxWorkspaceIn {
  from {
    opacity: .65;
    transform: translateY(2px) scale(.985)
  }
  to {
    opacity: 1;
    transform: none
  }
}

/* right system zone */
.linux-right {
  min-width: 235px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.linux-status {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid #dedede;
  background: #fafafa;
  border-radius: 8px;
  color: #777;
  font-size: 7px;
  font-weight: 750;
}

.linux-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(237,28,36,.25);
  animation: linuxStatusPulse 2.4s ease-out infinite;
}

@keyframes linuxStatusPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(237,28,36,.22)
  }
  70% {
    box-shadow: 0 0 0 6px rgba(237,28,36,0)
  }
  100% {
    box-shadow: 0 0 0 0 rgba(237,28,36,0)
  }
}

/* compact user menu */
.linux-profile {
  min-width: 170px;
  height: 42px;
  padding: 4px 7px!important;
  border: 1px solid #ddd!important;
  border-radius: 9px!important;
  background: #fff!important;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.linux-profile:hover {
  border-color: #bbb!important;
  box-shadow: 0 8px 22px rgba(0,0,0,.065);
  transform: translateY(-1px);
}

.linux-profile .profile-dot {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: #171717;
  color: #fff;
  border: 0;
}

.linux-profile-copy {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.linux-profile-copy b {
  display: block;
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.linux-profile-copy span {
  display: block;
  margin-top: 3px;
  color: #999;
  font-size: 6px;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.linux-profile .profile-chevron {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #777;
  background: #f4f4f4;
  transition: transform .18s ease, background .18s ease;
}

.profile-wrap:has(.profile-menu:not(.hidden)) .linux-profile .profile-chevron {
  transform: rotate(180deg);
}

/* menu: desktop context-menu feeling */
.linux-topbar .profile-menu {
  top: calc(100% + 8px);
  width: 215px;
  padding: 5px;
  background: rgba(255,255,255,.98);
  border: 1px solid #d8d8d8;
  border-radius: 9px;
  box-shadow: 0 18px 50px rgba(0,0,0,.16);
  transform-origin: top right;
  animation: linuxMenuOpen .16s ease both;
}

@keyframes linuxMenuOpen {
  from {
    opacity: 0;
    transform: translateY(-5px) scale(.98)
  }
  to {
    opacity: 1;
    transform: none
  }
}

.linux-topbar .profile-menu button {
  color: #444;
  border-radius: 6px;
  padding: 9px 10px;
  font-size: 12px;
  transition: background .13s ease, color .13s ease, transform .13s ease;
}

.linux-topbar .profile-menu button:hover {
  background: #f1f1f1;
  color: #111;
  transform: translateX(2px);
}

.linux-topbar .profile-menu button:last-child:hover {
  background: #fff1f1;
  color: var(--red2);
}

/* preserve editor size below header */
body.files-mode .topbar {
  display: flex!important;
  height: var(--header-h)!important;
}

body.files-mode main {
  height: calc(100vh - var(--header-h))!important;
}

body.files-mode #page-files {
  height: calc(100vh - var(--header-h))!important;
}

/* page transition: similar to a desktop workspace switch */
.page.active {
  animation: linuxPageEnter .2s cubic-bezier(.2,.8,.2,1);
}

@keyframes linuxPageEnter {
  from {
    opacity: .72;
    transform: translateY(3px)
  }
  to {
    opacity: 1;
    transform: none
  }
}

/* small tactile response on portal buttons */
.btn, .game-actions button, .master-card-actions button, .team-card-actions button {
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease, border-color .14s ease;
}

.btn:active, .game-actions button:active, .master-card-actions button:active, .team-card-actions button:active {
  transform: scale(.975);
}

/* responsive */
@media(max-width:1180px) {
  .linux-brand-wrap {
    min-width: 150px
  }
  .linux-app-name {
    display: none
  }
  .linux-right {
    min-width: 190px
  }
  .linux-nav .nav {
    padding: 0 9px;
    font-size: 8px
  }
}

@media(max-width:900px) {
  .linux-topbar {
    padding: 0 10px;
    gap: 8px
  }
  .linux-brand-wrap {
    min-width: 108px
  }
  .linux-brand-wrap .brand {
    width: 105px;
    min-width: 105px
  }
  .linux-brand-wrap .brand img {
    width: 102px
  }
  .linux-status {
    display: none
  }
  .linux-right {
    min-width: 44px
  }
  .linux-profile {
    min-width: 42px;
    width: 42px;
    padding: 4px!important
  }
  .linux-profile-copy, .linux-profile .profile-chevron {
    display: none
  }
  .linux-nav {
    justify-content: flex-start
  }
  .linux-nav .nav {
    padding: 0 8px
  }
}

@media(max-width:620px) {
  :root {
    --header-h: 64px
  }
  .linux-brand-wrap {
    min-width: 78px
  }
  .linux-brand-wrap .brand {
    width: 76px;
    min-width: 76px
  }
  .linux-brand-wrap .brand img {
    width: 74px
  }
  .linux-nav .nav {
    height: 34px;
    padding: 0 7px;
    font-size: 7px
  }
  .linux-profile {
    height: 38px
  }
  .linux-profile .profile-dot {
    width: 29px;
    height: 29px
  }
}

/* accessibility */
@media(prefers-reduced-motion:reduce) {
  *, *:before, *:after {
    animation-duration: .001ms!important;
    animation-iteration-count: 1!important;
    transition-duration: .001ms!important;
    scroll-behavior: auto!important;
  }
}

/* ============================================================
v12.4 — PIC Duty Search & Full Duty History
============================================================ */
.pic-duty-toolbar {
  display: grid;
  grid-template-columns: minmax(320px,1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}

.pic-search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 46px;
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.045);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.pic-search-box:focus-within {
  border-color: #aaa;
  box-shadow: 0 10px 28px rgba(0,0,0,.075);
  transform: translateY(-1px);
}

.pic-search-icon {
  width: 42px;
  min-width: 42px;
  display: grid;
  place-items: center;
  color: #888;
  font-size: 16px;
  font-weight: 900;
}

.pic-search-box input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #222;
  font-size: 9px;
  font-family: inherit;
}

.pic-search-box input::placeholder {
  color: #aaa
}

.pic-search-clear {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 0;
  border-radius: 6px;
  background: #f0f0f0;
  color: #777;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.pic-search-clear:hover {
  background: #111;
  color: #fff
}

.pic-duty-summary {
  display: flex;
  gap: 7px;
}

.pic-duty-summary>div {
  min-width: 105px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 11px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.035);
}

.pic-duty-summary span {
  color: #888;
  font-size: 6px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .35px;
}

.pic-duty-summary strong {
  margin-top: 3px;
  color: #171717;
  font-size: 17px;
  line-height: 1;
}

.pic-search-result {
  margin: -3px 0 10px;
  padding: 7px 10px;
  border: 1px solid #ddd;
  border-radius: 7px;
  background: #fafafa;
  color: #777;
  font-size: 8px;
}

.pic-search-result b {
  color: #222
}

/* richer PIC cards */
.pic-duty-grid {
  grid-template-columns: repeat(auto-fill,minmax(300px,1fr));
}

.pic-duty-grid .pic-card {
  position: relative;
  grid-template-columns: 48px minmax(0,1fr);
  align-items: start;
  overflow: hidden;
  padding: 13px;
  transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease;
}

.pic-duty-grid .pic-card:hover {
  transform: translateY(-3px);
  border-color: #bbb;
  box-shadow: 0 15px 34px rgba(0,0,0,.085);
}

.pic-duty-grid .pic-avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.pic-duty-grid .pic-avatar:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--red);
}

.pic-duty-count {
  margin-top: 9px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pic-duty-count>div {
  background: #f7f7f7;
  border: 1px solid #e3e3e3;
  border-radius: 7px;
  padding: 7px 8px;
}

.pic-duty-count span {
  display: block;
  font-size: 6px;
  color: #888;
  text-transform: uppercase;
  font-weight: 900;
}

.pic-duty-count strong {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #171717;
}

.pic-game-history-preview {
  grid-column: 1/-1;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid #e8e8e8;
}

.pic-game-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.pic-game-history-head span {
  font-size: 7px;
  color: #777;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .25px;
}

.pic-game-history-head small {
  color: #999;
  font-size: 7px;
}

.pic-game-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 25px;
}

.pic-game-chip {
  max-width: 100%;
  border: 1px solid #ddd;
  background: #fafafa;
  color: #444;
  border-radius: 99px;
  padding: 5px 7px;
  font-size: 7px;
  font-weight: 750;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pic-game-chip:first-child {
  border-color: #e1b2b4;
  background: #fff7f7;
  color: #9f171c;
}

.pic-no-history {
  width: 100%;
  padding: 7px;
  border: 1px dashed #d4d4d4;
  border-radius: 7px;
  color: #999;
  background: #fafafa;
  text-align: center;
  font-size: 7px;
}

.pic-history-button {
  grid-column: 1/-1;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  border-radius: 7px;
  padding: 8px;
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
  transition: .15s ease;
}

.pic-history-button:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

.pic-history-button b {
  color: var(--red)
}

.pic-history-button:hover b {
  color: #fff
}

.pic-duty-grid .pic-card-actions {
  margin-top: 2px;
}

/* history popup gets a slightly denser game list */
.pic-full-history-summary {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pic-full-history-summary span {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 99px;
  padding: 4px 7px;
  font-size: 7px;
  color: #666;
}

.pic-full-history-summary b {
  color: #222;
  margin-right: 3px
}

@media(max-width:760px) {
  .pic-duty-toolbar {
    grid-template-columns: 1fr
  }
  .pic-duty-summary {
    width: 100%
  }
  .pic-duty-summary>div {
    flex: 1
  }
  .pic-duty-grid {
    grid-template-columns: 1fr
  }
}

/* ============================================================
v12.5 — Lightweight Portal
============================================================ */

/* PIC cards stay compact. Game names live only inside popup history. */
.pic-game-history-preview {
  display: none!important
}

.pic-duty-grid .pic-card {
  grid-template-columns: 48px minmax(0,1fr);
}

.pic-history-button {
  margin-top: 10px;
  background: #fafafa;
}

.pic-history-button:before {
  content: "↗";
  margin-right: 5px;
  color: var(--red);
}

/* Browser rendering optimization for large dashboards/libraries. */
.game-card, .pic-card, .team-card, .admin-card, .master-card, .analytics-card, .month-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 280px;
}

/* ============================================================
Lightweight game-entry login
No video, canvas, WebGL, or large assets.
Only transform/opacity animations.
============================================================ */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 120%,#261012 0,#151515 33%,#0e0e0e 72%);
}

.login-screen.hidden {
  display: none
}

.login-world {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: .65;
}

.login-grid {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -38%;
  height: 72%;
  background-image: linear-gradient(rgba(237,28,36,.11) 1px,transparent 1px), linear-gradient(90deg,rgba(237,28,36,.11) 1px,transparent 1px);
  background-size: 54px 54px;
  transform: perspective(520px) rotateX(67deg);
  transform-origin: center top;
  animation: loginGridMove 7s linear infinite;
  -webkit-mask-image: linear-gradient(to bottom,transparent,#000 25%,#000 75%,transparent);
  mask-image: linear-gradient(to bottom,transparent,#000 25%,#000 75%,transparent);
}

@keyframes loginGridMove {
  from {
    background-position: 0 0, 0 0
  }
  to {
    background-position: 0 54px, 54px 0
  }
}

.login-orbit {
  position: absolute;
  border: 1px solid rgba(237,28,36,.17);
  border-radius: 50%;
  will-change: transform;
}

.orbit-a {
  width: 390px;
  height: 390px;
  right: -170px;
  top: -175px;
  animation: loginOrbitA 14s linear infinite;
}

.orbit-b {
  width: 240px;
  height: 240px;
  left: -100px;
  bottom: -105px;
  border-color: rgba(255,255,255,.075);
  animation: loginOrbitB 18s linear infinite;
}

.login-orbit:before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  left: 50%;
  top: -4px;
}

@keyframes loginOrbitA {
  to {
    transform: rotate(360deg)
  }
}

@keyframes loginOrbitB {
  to {
    transform: rotate(-360deg)
  }
}

.login-card {
  position: relative;
  z-index: 2;
  width: min(430px,100%);
  background: rgba(255,255,255,.985);
  border: 1px solid rgba(255,255,255,.14);
  border-top: 4px solid var(--red);
  border-radius: 15px;
  padding: 27px 29px 25px;
  box-shadow: 0 32px 90px rgba(0,0,0,.48);
  animation: loginCardSpawn .42s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes loginCardSpawn {
  from {
    opacity: 0;
    transform: translateY(13px) scale(.975)
  }
  to {
    opacity: 1;
    transform: none
  }
}

.login-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 21px;
}

.login-card-head img {
  width: 145px;
  max-height: 46px;
  object-fit: contain;
  object-position: left;
  margin: 0;
}

.login-build {
  border: 1px solid #ddd;
  background: #f7f7f7;
  border-radius: 99px;
  padding: 5px 7px;
  color: #888;
  font-size: 6px;
  font-weight: 900;
  letter-spacing: .8px;
}

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

.login-card p {
  color: #777;
  font-size: 10px;
  line-height: 1.55;
  margin-bottom: 20px
}

.login-card form {
  display: grid;
  gap: 12px
}

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 9px;
  font-weight: 850
}

.login-card input {
  padding: 11px;
  border: 1px solid #ccc;
  border-radius: 7px;
  outline: 0;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.login-card input:focus {
  border-color: #999;
  box-shadow: 0 0 0 3px rgba(237,28,36,.06);
  transform: translateY(-1px);
}

.login-enter-btn {
  height: 43px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.login-enter-btn i {
  font-style: normal;
  font-size: 14px;
  transition: transform .18s ease;
}

.login-enter-btn:hover i {
  transform: translateX(4px)
}

.login-auth-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: #aaa;
}

.login-auth-status span {
  width: 6px;
  height: 6px;
  background: #888;
  border-radius: 50%;
}

.login-auth-status b {
  font-size: 6px;
  letter-spacing: .8px;
}

.login-screen.authenticating .login-auth-status span {
  background: var(--red);
  animation: authDot 1s ease-in-out infinite;
}

.login-screen.authenticating .login-auth-status b:after {
  content: " • AUTHENTICATING"
}

@keyframes authDot {
  0%, 100% {
    opacity: .35;
    transform: scale(.8)
  }
  50% {
    opacity: 1;
    transform: scale(1.15)
  }
}

.login-enter-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: #fff;
  opacity: 0;
}

.login-screen.login-success .login-card {
  animation: loginEnterPortal .48s cubic-bezier(.4,0,.2,1) forwards;
}

.login-screen.login-success .login-grid {
  animation: loginGridEnter .48s cubic-bezier(.4,0,.2,1) forwards;
}

.login-screen.login-success .login-enter-flash {
  animation: loginFlash .48s ease forwards;
}

@keyframes loginEnterPortal {
  0% {
    opacity: 1;
    transform: none
  }
  70% {
    opacity: .9;
    transform: scale(1.035)
  }
  100% {
    opacity: 0;
    transform: scale(1.08)
  }
}

@keyframes loginGridEnter {
  to {
    opacity: 0;
    transform: perspective(520px) rotateX(67deg) scale(1.18)
  }
}

@keyframes loginFlash {
  0%, 55% {
    opacity: 0
  }
  76% {
    opacity: .10
  }
  100% {
    opacity: 0
  }
}

.login-message {
  min-height: 20px;
  margin-top: 7px;
  color: #b71319;
  font-size: 9px;
  font-weight: 800
}

/* Incremental month rendering */
.month-load-more {
  grid-column: 1/-1;
  display: flex;
  justify-content: center;
  padding: 8px 0 2px;
}

.month-load-more button {
  min-width: 170px;
  border: 1px solid #ccc;
  background: #fff;
  color: #555;
  border-radius: 7px;
  padding: 8px 12px;
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}

.month-load-more button:hover {
  background: #111;
  color: #fff;
  border-color: #111
}

/* Page rendering status — keeps transitions cheap */
.page:not(.active) {
  content-visibility: hidden
}

@media(prefers-reduced-motion:reduce) {
  .login-grid, .login-orbit, .login-card, .login-auth-status span, .login-enter-flash {
    animation: none!important;
  }
}

/* ============================================================
v12.6 — Clean Overview + Light Login
============================================================ */

/* Overview starts directly with management data; introductory hero removed. */
#page-dashboard {
  padding-top: 18px;
}

#page-dashboard .executive-metrics {
  margin-top: 0;
}

/* Light game-entry login — white/soft gray, still animated. */
.login-screen {
  background: radial-gradient(circle at 18% 16%,rgba(237,28,36,.055),transparent 28%), radial-gradient(circle at 82% 80%,rgba(0,0,0,.035),transparent 30%), linear-gradient(180deg,#ffffff 0%,#f6f6f6 55%,#eeeeee 100%)!important;
}

.login-world {
  opacity: .72;
}

.login-grid {
  background-image: linear-gradient(rgba(237,28,36,.085) 1px,transparent 1px), linear-gradient(90deg,rgba(80,80,80,.055) 1px,transparent 1px)!important;
  -webkit-mask-image: linear-gradient(to bottom,transparent,rgba(0,0,0,.75) 25%,rgba(0,0,0,.6) 72%,transparent);
  mask-image: linear-gradient(to bottom,transparent,rgba(0,0,0,.75) 25%,rgba(0,0,0,.6) 72%,transparent);
}

.login-orbit {
  border-color: rgba(237,28,36,.13)!important;
}

.orbit-b {
  border-color: rgba(70,70,70,.09)!important;
}

.login-orbit:before {
  box-shadow: 0 0 0 5px rgba(237,28,36,.055);
}

.login-card {
  background: rgba(255,255,255,.94)!important;
  border: 1px solid rgba(205,205,205,.9)!important;
  border-top: 4px solid var(--red)!important;
  box-shadow: 0 24px 70px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.035)!important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.login-build {
  background: #fafafa!important;
  border-color: #dfdfdf!important;
  color: #8a8a8a!important;
}

.login-auth-status {
  color: #999!important;
}

.login-enter-flash {
  background: #fff!important;
}

/* Keep animation subtle against the light background. */
@keyframes loginFlash {
  0%, 55% {
    opacity: 0
  }
  76% {
    opacity: .32
  }
  100% {
    opacity: 0
  }
}

/* ============================================================
v12.6.2 — Layout consistency
Workload + Game Library wrap downward.
Only Master Game Library scrolls horizontally.
============================================================ */

/* Workload by programmer: normal responsive grid, no horizontal strip */
.member-board {
  display: grid!important;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr))!important;
  gap: 12px!important;
  overflow: visible!important;
  overflow-x: visible!important;
  scroll-snap-type: none!important;
  padding-bottom: 0!important;
}

.member-board .member-column, .member-board .monitor-card {
  min-width: 0!important;
  width: auto!important;
  max-width: none!important;
  flex: none!important;
  scroll-snap-align: none!important;
}

/* Game Library: monthly cards always wrap downward */
.game-library-groups {
  display: grid!important;
  gap: 22px!important;
  overflow: visible!important;
  overflow-x: visible!important;
}

.month-section {
  min-width: 0!important;
  overflow: visible!important;
}

.month-game-grid {
  display: grid!important;
  grid-template-columns: repeat(auto-fill,minmax(270px,1fr))!important;
  gap: 12px!important;
  overflow: visible!important;
  overflow-x: visible!important;
  scroll-snap-type: none!important;
}

.month-game-grid .game-card {
  min-width: 0!important;
  width: auto!important;
  max-width: none!important;
  flex: none!important;
  scroll-snap-align: none!important;
}

/* Master Game Library is the only horizontal-scroll card rail */
.master-horizontal-scroll {
  display: flex!important;
  flex-wrap: nowrap!important;
  gap: 11px!important;
  overflow-x: auto!important;
  overflow-y: hidden!important;
  scroll-snap-type: x proximity!important;
  scroll-behavior: smooth!important;
}

.master-horizontal-scroll .master-card {
  flex: 0 0 275px!important;
  width: 275px!important;
  min-width: 275px!important;
  scroll-snap-align: start!important;
}

/* Responsive downward stacking */
@media(max-width:1100px) {
  .member-board {
    grid-template-columns: repeat(2,minmax(0,1fr))!important;
  }
}

@media(max-width:720px) {
  .member-board {
    grid-template-columns: 1fr!important;
  }
  .month-game-grid {
    grid-template-columns: 1fr!important;
  }
}

/* Tombol status manual di daftar workload programmer. */
.workload-completion-action {
  grid-column: 1 / -1;
  justify-self: end;
  padding: 7px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700
}

.workload-completion-action:disabled {
  opacity: .6;
  cursor: wait
}

/* Keep the original card layout; display programmer once in the top label. */
.game-card .game-type.game-programmer-label {
  text-transform: none!important;
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}
