/* FlexCity website platform systems — v7 */
.platform-hero { min-height: 720px; }
.header-balance { min-height: 42px; padding: 5px 11px 5px 7px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-yellow); border-radius: 999px; background: rgba(255,230,0,.07); }
.header-balance img { width: 30px; height: 30px; }
.header-balance strong { color: var(--yellow); font-size: 13px; }

.daily-overview { display: grid; gap: 10px; }
.daily-task { padding: 12px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 14px; background: rgba(255,255,255,.035); }
.daily-task.ready { border-color: rgba(255,230,0,.42); }
.daily-task.done { opacity: .82; }
.daily-task img { width: 42px; height: 42px; }
.daily-task strong, .daily-task span { display: block; }
.daily-task span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.daily-task a { color: var(--yellow); font-size: 12px; font-weight: 900; }

.giveaway-web-card h3 { margin: 18px 0 10px; font-size: 22px; }
.giveaway-web-card .button { margin-top: 16px; width: fit-content; }
.narrow-section { max-width: 760px; }
.giveaway-entry-panel { text-align: center; }
.large-feature-icon { width: 108px; height: 108px; margin: 0 auto 18px; }
.giveaway-entry-panel .status-badge { margin-inline: auto; }
.giveaway-entry-panel h2 { margin-top: 18px; }

.activity-feed { display: grid; gap: 10px; }
.activity-feed-row { padding: 14px 16px; display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.activity-feed-row > img { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; }
.activity-feed-row p { margin: 3px 0 0; color: var(--muted); }
.activity-feed-row time { color: var(--muted-dark); font-size: 11px; white-space: nowrap; }

.reward-summary-grid, .wallet-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.reward-summary-grid { grid-template-columns: repeat(6,minmax(0,1fr)); margin-bottom: 18px; }
.reward-summary-grid article, .wallet-summary-grid article { min-height: 138px; padding: 18px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.reward-summary-grid img, .wallet-summary-grid img { width: 42px; height: 42px; margin-bottom: 12px; }
.reward-summary-grid span, .wallet-summary-grid span { color: var(--muted); font-size: 12px; font-weight: 750; }
.reward-summary-grid strong, .wallet-summary-grid strong { margin-top: 5px; color: var(--yellow); font-size: 24px; }
.reward-summary-grid small, .wallet-summary-grid small { margin-top: 4px; color: var(--muted-dark); }

.reward-feature-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 14px; }
.reward-card { min-height: 360px; padding: 26px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-large); background: linear-gradient(150deg,rgba(255,230,0,.06),rgba(33,150,243,.04)),var(--surface); box-shadow: var(--shadow-small); }
.reward-card > img { width: 86px; height: 86px; margin-bottom: 16px; }
.reward-card h2 { margin: 8px 0; font-size: 30px; }
.reward-card p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.reward-card form { width: 100%; display: grid; gap: 10px; }
.reward-card input, .reward-card select, .dialog-card input, .dialog-card select { width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 12px; outline: none; color: var(--text); background: rgba(255,255,255,.055); }
.reward-card small { margin-top: 10px; color: var(--muted); }
.roulette-result { min-height: 28px; margin-top: 12px; color: var(--yellow); font-weight: 900; }

.level-case-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.level-case-card { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); text-align: center; }
.level-case-card img { width: 64px; height: 64px; }
.level-case-card span { color: var(--muted); font-size: 12px; }
.level-case-card.unlocked { border-color: var(--border-yellow); box-shadow: 0 0 34px rgba(255,230,0,.08); }
.level-case-card.claimed { opacity: .7; }

.case-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.case-card { padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-large); background: var(--surface); }
.case-card img { width: 120px; height: 120px; }
.case-card h3 { margin: 14px 0 4px; font-size: 25px; }
.case-card p { color: var(--muted); }

.battle-list { display: grid; gap: 10px; }
.battle-row { padding: 16px; display: grid; grid-template-columns: minmax(180px,1.4fr) .7fr auto auto; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.battle-row strong, .battle-row span { display: block; }
.battle-row > div > span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.battle-actions { display: flex; gap: 7px; }

.wallet-hero { margin-bottom: 16px; }
.wallet-hero h1 { margin: 8px 0; }
.wallet-hero p { color: var(--muted); }
.wallet-summary-grid { margin-bottom: 16px; }
.wallet-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 16px; margin-bottom: 16px; }
.transaction-list { display: grid; gap: 8px; }
.transaction-row { padding: 12px; display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: 11px; border: 1px solid var(--border); border-radius: 13px; background: rgba(255,255,255,.025); }
.transaction-row img { width: 42px; height: 42px; }
.transaction-row span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.positive { color: #86efac !important; }
.negative { color: #fca5a5 !important; }

.affiliate-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.affiliate-hero > img { width: 128px; height: 128px; }
.affiliate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.affiliate-code-display { margin: 18px 0; display: flex; align-items: center; gap: 12px; }
.affiliate-code-display strong { padding: 14px 20px; border: 1px dashed var(--border-yellow); border-radius: 14px; color: var(--yellow); font-size: 30px; letter-spacing: .08em; background: rgba(255,230,0,.05); }
.affiliate-stats { margin-bottom: 16px; }

.profile-badges { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 7px; }
.icon-badge { width: 42px; height: 42px; padding: 0; border: 0; border-radius: 12px; background: transparent; cursor: help; }
.icon-badge img { width: 100%; height: 100%; }
.modern-account-grid .account-card > img { width: 48px; height: 48px; }

.game-hub-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.game-hub-card { min-height: 260px; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-large); background: linear-gradient(140deg,rgba(255,230,0,.06),rgba(33,150,243,.05)),var(--surface); transition: 160ms ease; }
.game-hub-card:hover { transform: translateY(-3px); border-color: var(--border-yellow); }
.game-hub-card img { width: 82px; height: 82px; }
.game-hub-card h2 { margin: 18px 0 8px; }
.game-hub-card p { color: var(--muted); line-height: 1.6; }

.platform-dialog { width: min(520px,calc(100% - 24px)); padding: 0; border: 1px solid var(--border-yellow); border-radius: 24px; color: var(--text); background: #07111f; box-shadow: var(--shadow); }
.platform-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.dialog-card { position: relative; padding: 30px; display: grid; gap: 13px; }
.dialog-card h2 { margin: 0; font-size: 30px; }
.dialog-card p:not(.eyebrow) { margin: 0; color: var(--muted); line-height: 1.6; }
.dialog-card label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 750; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: rgba(255,255,255,.04); cursor: pointer; }
.dialog-icon { width: 82px; height: 82px; }

.tooltip-popover { position: fixed; z-index: 1000; max-width: 220px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: #07111f; box-shadow: var(--shadow-small); font-size: 12px; font-weight: 750; pointer-events: none; }

.chat-toggle { position: fixed; right: 20px; bottom: 20px; z-index: 500; width: 58px; height: 58px; padding: 0; border: 1px solid var(--border-yellow); border-radius: 18px; background: #07111f; box-shadow: var(--shadow); cursor: pointer; }
.chat-toggle img { width: 100%; height: 100%; }
.chat-unread { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 5px; display: grid; place-items: center; border: 2px solid var(--background); border-radius: 999px; color: white; background: var(--red); font-size: 11px; font-weight: 900; }
.chat-panel { position: fixed; right: 20px; bottom: 88px; z-index: 490; width: min(390px,calc(100vw - 24px)); height: min(620px,calc(100vh - 120px)); display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--border-yellow); border-radius: 24px; background: rgba(7,17,31,.98); box-shadow: var(--shadow); transform: translateY(18px) scale(.97); opacity: 0; visibility: hidden; transition: 180ms ease; overflow: hidden; }
.chat-panel.open { transform: none; opacity: 1; visibility: visible; }
.chat-panel > header { padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.chat-panel > header p { margin: 0; }
.chat-panel > header button { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; color: var(--text); background: transparent; cursor: pointer; }
.chat-messages { padding: 12px; display: grid; align-content: start; gap: 9px; overflow-y: auto; }
.chat-message { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 9px; }
.chat-message > img { width: 36px; height: 36px; border-radius: 12px; object-fit: cover; }
.chat-message-top { display: flex; align-items: center; gap: 5px; }
.chat-message-top strong { font-size: 12px; }
.chat-message-top time { margin-left: auto; color: var(--muted-dark); font-size: 9px; }
.chat-badge { width: 18px; height: 18px; }
.chat-message p { margin: 3px 0 0; color: #d8e0ec; font-size: 13px; line-height: 1.4; word-break: break-word; }
.chat-form { padding: 11px; display: grid; grid-template-columns: 1fr auto; gap: 8px; border-top: 1px solid var(--border); }
.chat-form input { min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.045); }
.chat-form button { padding: 0 14px; border: 0; border-radius: 12px; color: #05070b; background: var(--yellow); font-weight: 900; }
.chat-login { margin: 12px; }

.mobile-bottom-nav { display: none; }
.floating-platform-message { position: fixed; left: 50%; bottom: 22px; z-index: 850; transform: translateX(-50%); padding: 13px 18px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: #07111f; box-shadow: var(--shadow); }
.floating-platform-message:empty { display: none; }

.staff-role-summary { margin-top: 20px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.permission-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.permission-chips span { padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.035); font-size: 11px; }
.wide-row { grid-template-columns: .6fr 1.4fr .8fr .7fr auto !important; }
.withdrawal-admin-card { padding: 18px; display: grid; gap: 14px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.025); }
.withdrawal-admin-head, .withdrawal-admin-values, .withdrawal-admin-actions { display: flex; align-items: center; gap: 10px; }
.withdrawal-admin-head { justify-content: space-between; }
.withdrawal-admin-head span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.withdrawal-admin-values { flex-wrap: wrap; }
.withdrawal-admin-values span { padding: 7px 10px; border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 12px; }
.withdrawal-admin-actions { flex-wrap: wrap; }
.withdrawal-admin-actions input, .withdrawal-admin-actions select, .dashboard-form select { min-height: 42px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #0b1525; }
.chat-admin-row { grid-template-columns: .35fr 1fr 2fr .8fr auto !important; }
.affiliate-admin-row { grid-template-columns: .8fr 1.3fr .7fr 1.2fr auto !important; }
.compact-form { margin-bottom: 20px; }

@media (max-width: 1100px) {
  .reward-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .level-case-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .reward-feature-grid { grid-template-columns: 1fr 1fr; }
  .daily-case-card { grid-row: span 2; }
}

@media (max-width: 900px) {
  .wallet-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wallet-layout, .affiliate-grid { grid-template-columns: 1fr; }
  .reward-feature-grid { grid-template-columns: 1fr; }
  .daily-case-card { grid-row: auto; }
  .case-grid { grid-template-columns: 1fr 1fr; }
  .battle-row { grid-template-columns: 1fr auto; }
  .battle-actions { grid-column: 1/-1; }
  .activity-feed-row { grid-template-columns: 42px 1fr; }
  .activity-feed-row time { grid-column: 2; }
}

@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .site-header { height: 66px; }
  .header-inner { width: calc(100% - 20px); gap: 8px; }
  .brand-copy, .header-profile span { display: none; }
  .brand-icon { width: 42px; height: 42px; }
  .header-balance { margin-left: auto; }
  .header-balance strong { max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
  .mobile-menu-button { order: 10; display: block; }
  .header-login-button { min-height: 40px; padding-inline: 12px; font-size: 12px; }
  .platform-hero { min-height: auto; }
  .reward-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wallet-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .reward-summary-grid article, .wallet-summary-grid article { min-height: 120px; }
  .level-case-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-grid, .game-hub-grid { grid-template-columns: 1fr; }
  .affiliate-hero { align-items: flex-start; flex-direction: column; }
  .affiliate-hero > img { width: 90px; height: 90px; }
  .affiliate-code-display { align-items: stretch; flex-direction: column; }
  .affiliate-code-display strong { font-size: 24px; text-align: center; }
  .activity-feed-row time { display: none; }
  .mobile-bottom-nav { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 400; height: 62px; padding: 5px; display: grid; grid-template-columns: repeat(5,1fr); border: 1px solid var(--border); border-radius: 20px; background: rgba(7,17,31,.95); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
  .mobile-bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px; color: var(--muted); font-size: 9px; font-weight: 800; }
  .mobile-bottom-nav a.active { color: #06080e; background: var(--yellow); }
  .mobile-bottom-nav img { width: 30px; height: 30px; }
  .chat-toggle { right: 14px; bottom: 82px; width: 52px; height: 52px; }
  .chat-panel { inset: 10px 10px 80px; width: auto; height: auto; border-radius: 22px; }
  .wide-row, .chat-admin-row, .affiliate-admin-row { grid-template-columns: 1fr !important; }
  .withdrawal-admin-actions, .withdrawal-admin-values { align-items: stretch; flex-direction: column; }
  .withdrawal-admin-actions > * { width: 100%; }
}

.giveaway-admin-card,
.event-admin-card {
  padding: 18px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.staff-editor {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0,0,0,.14);
}
.staff-editor > summary {
  color: var(--yellow);
  font-weight: 800;
  cursor: pointer;
}
.staff-editor[open] > summary { margin-bottom: 14px; }
.staff-editor textarea { min-height: 110px; }
.dashboard-form + .staff-table { margin-top: 20px; }


/* v9 chat mentions */
.chat-input-wrap { position: relative; min-width: 0; }
.chat-input-wrap > input { width: 100%; }
.chat-mention-suggestions { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); z-index: 30; max-height: 240px; padding: 6px; display: grid; gap: 4px; overflow-y: auto; border: 1px solid var(--border-yellow); border-radius: 14px; background: #07111f; box-shadow: var(--shadow); }
.chat-mention-option { width: 100%; padding: 8px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 10px; color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.chat-mention-option:hover, .chat-mention-option:focus-visible { background: rgba(255,230,0,.1); outline: none; }
.chat-mention-option img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.chat-mention-option span { min-width: 0; display: grid; }
.chat-mention-option strong, .chat-mention-option small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mention-option small { color: var(--muted-dark); }
.chat-name-button { padding: 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: 900; cursor: pointer; }
.chat-name-button:hover { color: var(--yellow); }
.chat-mention { padding: 1px 4px; border-radius: 5px; color: #ffe600; background: rgba(255,230,0,.12); font-weight: 800; }
.chat-mention-me { color: white; background: #d92c3a; }
.chat-message-mentioned { padding: 7px; margin: -7px; border-left: 3px solid #d92c3a; border-radius: 9px; background: rgba(217,44,58,.08); }
.chat-unread[hidden] { display: none !important; }

/* v9 FAQ */
.faq-section { display: grid; gap: 34px; }
.faq-category { display: grid; gap: 14px; }
.faq-category .section-heading { margin-bottom: 0; }

/* v9 staff tabs */
.staff-tabs button { flex: 0 0 auto; }
.staff-panel[hidden] { display: none !important; }
