/* Private login details stay inside the existing profile details section. */
.public-stats-profile-strip > .public-stats-last-login { grid-column: 1 / -1; }
.public-stats-last-login [data-admin-login-value] > small { margin-top: 4px; text-transform: none; }
@media (min-width: 900px) {
  .public-stats-profile-strip:has(.public-stats-last-login) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .public-stats-profile-strip > .public-stats-last-login { grid-column: auto; }
}

/* Server management: one paged overview and one focused editor. */
.game-server-manage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.game-server-manage-actions .game-server-map-toggle { flex: 0 0 auto; margin: 0; white-space: nowrap; }
.game-server-map-toggle input[type="checkbox"] { width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: 0 0 16px; }
.game-server-catalog-table [data-edit-map-server] { margin: 0; flex: 0 0 auto; }
#public-map-configs-panel { scroll-margin-top: 24px; }
#public-map-save-status { align-self: center; }
@media (max-width: 760px) {
  .game-server-catalog-table { min-width: 0; width: 100%; }
  .game-server-catalog-table thead { display: none; }
  .game-server-catalog-table tbody { display: grid; gap: 12px; }
  .game-server-catalog-table tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid var(--border); border-radius: 12px; padding: 10px;
  }
  .game-server-catalog-table td { display: block; overflow-wrap: anywhere; border: 0; min-width: 0; }
  .game-server-catalog-table td::before {
    content: attr(data-label); display: block; font-size: 11px; opacity: .65; margin-bottom: 5px;
  }
  .game-server-catalog-table .game-server-select-cell { grid-column: 1 / -1; }
  .game-server-catalog-table .game-server-select-cell::before { display: none; }
}
.server-filter-actions { display: flex; gap: 8px; align-items: center; }
.server-filter-actions .btn { flex: 1 0 auto; width: auto; white-space: nowrap; }

.troop-area-panel {
  position: fixed; right: 20px; bottom: 24px; z-index: 1100;
  width: min(400px, calc(100vw - 32px)); max-height: 70vh; overflow: auto;
  padding: 20px; border: 1px solid rgba(223,177,80,.5); border-radius: 16px;
  background: #202a30; color: #eef1f3; box-shadow: 0 12px 44px #0008;
}
.troop-area-panel [data-area-close] { float: right; }
.troop-area-panel p { margin: 10px 0; font-size: 13px; line-height: 1.5; }
.troop-area-panel ul { padding-left: 20px; }
.troop-area-panel a { color: #eabd68; }
@media (max-width:760px) { .troop-area-panel { right: 16px; bottom: 84px; } }
.troop-area-panel [data-area-close] { width: 32px; min-width: 32px; padding: 4px; margin-left: 8px; }

.troop-area-panel {
  background: linear-gradient(145deg, #25343b, #162127);
  border-color: #c79c4d80; box-shadow: 0 24px 80px #0009;
  animation: area-panel-in .22s ease-out; padding: 22px;
}
.troop-area-panel .area-close {
  position: absolute; right: 12px; top: 12px; width: 30px; height: 30px;
  border: 1px solid #ffffff25; border-radius: 50%; background: #ffffff08; color: inherit;
  cursor: pointer; font-size: 20px;
  display: grid; place-items: center; padding: 0; margin: 0; float: none; line-height: 1; box-sizing: border-box;
}
.troop-area-panel h3 { margin: 8px 30px 0 0; font-size: 21px; }
.area-eyebrow { color: #e8b652; text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 700; }
.troop-area-panel .area-location { color: #aebbc3; margin-top: 4px; }
.area-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.area-facts span { flex: 1; border: 1px solid #ffffff18; border-radius: 9px; padding: 9px; font-size: 12px; white-space: nowrap; }
.troop-area-panel .btn-primary { width: 100%; }
.area-status { font-weight: 600; }
.area-result-count { padding: 12px 0; border-bottom: 1px solid #ffffff20; }
.area-result-count b { color: #f3ce86; font-size: 21px; }
.area-result-count span { padding: 0 6px; }
.troop-area-panel .area-results { padding: 0; list-style: none; margin: 8px 0 0; }
.area-results a { display: flex; flex-wrap: wrap; gap: 6px; justify-content: space-between; padding: 13px 6px; border-bottom: 1px solid #ffffff12; text-decoration: none; transition: background .18s; }
.area-results a:hover { background: #ffffff09; }
.area-results small { color: #adbbc4; }
.area-radar { position: relative; height: 72px; width: 72px; margin: 20px auto; border: 1px solid #e8b65260; border-radius: 50%; overflow: hidden; }
.area-radar::before { content: ''; position: absolute; inset: 14px; border: 1px solid #e8b65235; border-radius: 50%; }
.area-radar i { position: absolute; inset: 0; background: conic-gradient(transparent 220deg, #e8b65280); animation: area-radar-spin 2.4s linear infinite; }
.area-radar b { position: absolute; top: 33px; left: 33px; width: 6px; height: 6px; background: #f4d085; border-radius: 50%; }
@keyframes area-radar-spin { to { transform: rotate(360deg); } }
@keyframes area-panel-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .troop-area-panel, .area-radar i { animation: none; } }

.area-progress{display:grid;gap:8px;margin:0 0 16px}
.area-progress small{color:var(--text-muted,#aab7bc);font-size:12px}
.area-progress-track{height:6px;overflow:hidden;background:#ffffff12;border-radius:8px}
.area-progress-track span{display:block;height:100%;background:linear-gradient(90deg,#b88a35,#ffd680);border-radius:inherit;transition:width .6s ease}
.area-progress-track.is-pending span{animation:area-progress-wait 1.8s ease-in-out infinite alternate}
@keyframes area-progress-wait{to{transform:translateX(230%)}}
@media(prefers-reduced-motion:reduce){.area-progress-track span{animation:none!important;transition:none}}

.troop-area-panel .area-close svg{display:block;pointer-events:none}
.troop-area-panel [data-area-start]:disabled{opacity:.55;cursor:not-allowed}

/* Shared admin workspace usability. */
.admin-page-index { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; padding:14px 18px; border:1px solid var(--border); border-radius:14px; }
.admin-page-index strong { color:var(--muted); font-size:12px; }
.admin-page-index a { font-size:13px; padding:5px 0; }
.admin-board .admin-page-card, .admin-board .admin-plan-config { scroll-margin-top:24px; }
.admin-board input[type="checkbox"] { width:16px; min-height:16px; height:16px; flex:0 0 16px; padding:0; }
.admin-board .btn { white-space:normal; overflow-wrap:anywhere; }
.admin-board .btn:focus-visible, .admin-page-index a:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
.admin-queue-capacity { padding:12px 14px; border:1px solid var(--border); border-radius:10px; font-size:13px; }
.admin-table-search { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin:12px 0; }
.admin-table-search input { flex:1 1 180px; width:auto; max-width:360px; }
.admin-readable-table tr[hidden] { display:none!important; }
@media(max-width:760px) {
  .admin-readable-table { min-width:0!important; width:100%; }
  .admin-readable-table thead { display:none; }
  .admin-readable-table tbody { display:grid; gap:12px; }
  .admin-readable-table tbody > tr { display:grid; grid-template-columns:minmax(0,1fr); padding:12px; border:1px solid var(--border); border-radius:12px; }
  .admin-readable-table td { display:block; width:auto!important; min-width:0!important; max-width:none!important; border:0; padding:7px 0; white-space:normal; overflow-wrap:anywhere; }
  .admin-readable-table td[data-admin-label]::before { content:attr(data-admin-label); display:block; margin-bottom:4px; font-size:11px; font-weight:700; color:var(--muted); }
  .admin-readable-table td .btn { max-width:100%; margin-top:8px; }
  .admin-board-section-head, .admin-page-card-head { flex-wrap:wrap; gap:12px; }
  .admin-system-card-actions { flex-wrap:wrap; }
}

/* Shared, quiet Season context; public dates deliberately omit times. */
.stats-season-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: .24rem .6rem;
  border: 1px solid rgba(154, 183, 191, .25);
  border-radius: 999px;
  background: rgba(154, 183, 191, .07);
  color: var(--muted);
  font-size: .74rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .015em;
}
.stats-season-badge.is-stale { color: var(--warning); border-color: rgba(199, 184, 154, .3); }
.public-stats-identity .stats-season-badge { margin: 0 0 .4rem; }
.server-stats-card > header .stats-season-badge { margin-left: auto; text-align: center; }
.stats-season-panel {
  margin: 0 0 1rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(154, 183, 191, .18);
  border-radius: 14px;
  background: rgba(154, 183, 191, .035);
}
.stats-season-panel > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.stats-season-panel > header small { color: var(--muted); font-size: .75rem; }
.stats-season-panel dl { display: flex; flex-wrap: wrap; gap: .8rem 2rem; margin: 1rem 0 0; }
.stats-season-panel dt, .stats-season-admin dt { color: var(--muted); font-size: .75rem; }
.stats-season-panel dd, .stats-season-admin dd { margin: .2rem 0 0; font-size: .85rem; }
.stats-season-next { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .9rem 0 0; font-size: .8rem; }
.stats-season-next span { color: var(--muted); }
.stats-season-admin summary { cursor: pointer; color: var(--text); font-size: .85rem; }
.stats-season-admin dl { display: grid; gap: .6rem; margin: .8rem 0; }
.stats-season-admin dd { overflow-wrap: anywhere; }
.stats-season-admin p { font-size: .8rem; }
@media (max-width: 600px) {
  .server-stats-card > header { flex-wrap: wrap; }
  .stats-season-panel { padding: .9rem; }
  .stats-season-panel dl { gap: .8rem 1.4rem; }
}

/* Focused inbox and separate account sections. */
#profile-dialog { width: min(720px, calc(100vw - 24px)); }
.profile-dialog-heading { padding: 20px 22px 4px; }
.profile-dialog-heading h2 { margin: 0; font-size: 1.55rem; }
.profile-dialog-heading p { margin: 6px 0 10px; }
#profile-dialog .profile-dialog-content { padding: 20px 22px; }
[data-profile-section] { display: grid; gap: 20px; }
[data-profile-section][hidden], .notification-panel[hidden] { display: none; }
#profile-rewards-btn { position: relative; }
#profile-rewards-btn .daily-checkin-reminder-dot { top: 18px; right: 16px; bottom: auto; }
#profile-rewards-btn.has-checkin-reminder { color: var(--primary); }
.account-section-tabs { display: flex; flex: 0 0 auto; gap: 4px; padding: 8px 18px; border-bottom: 1px solid var(--panel-border); }
.account-section-tabs button { flex: 1; min-width: 0; padding: 11px 8px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.account-section-tabs button[aria-selected="true"] { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 28%, transparent); color: var(--primary); }
.account-section-tabs button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.notifications-dialog { width: min(620px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; overflow: hidden; border: 1px solid var(--panel-border); border-radius: 18px; background: var(--panel); color: var(--text); }
.notifications-dialog[open] { display: flex; flex-direction: column; }
.notifications-dialog .profile-dialog-toolbar { padding: 18px 20px; }
.notifications-dialog h2 { margin: 5px 0 0; font-size: 1.45rem; }
.notification-panel { padding: 16px 20px 20px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.notification-panel .profile-dev-messages-head { flex-wrap: nowrap; align-items: flex-start; margin-bottom: 14px; }
.notification-panel .profile-dev-messages-head p { margin: 0; max-width: 370px; font-size: .79rem; line-height: 1.5; }
.notification-panel .profile-dev-messages-head .btn { padding: 7px 10px; font-size: .75rem; flex: 0 0 auto; }
.notification-panel .profile-dev-messages-list { max-height: min(52dvh, 560px); }
.notification-panel article { padding: 14px; gap: 9px; }
.notification-panel article p { font-size: .86rem; line-height: 1.5; white-space: pre-wrap; }
.notification-panel article small { font-size: .7rem; }
.notification-quiet { margin-left: auto; padding: 3px 7px; border-radius: 6px; background: var(--panel-soft); color: var(--muted); font-size: .67rem; font-weight: 500; white-space: nowrap; }
.notification-empty { text-align: center; padding: 42px 14px; display: grid; gap: 12px; justify-items: center; }
.notification-empty > span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 1.5rem; }
.notification-empty p { max-width: 310px; font-size: .85rem; color: var(--muted); }
#notification-load-status { margin: 8px 0 0; font-size: .8rem; }
#notification-load-more { width: 100%; margin-top: 14px; }
.push-settings-intro h3 { margin: 6px 0; }
.push-settings-intro p { font-size: .86rem; line-height: 1.55; }
.push-status { padding: 11px 13px; border-radius: 9px; background: var(--panel-soft); font-size: .8rem; }
.push-preferences { display: grid; margin: 16px 0; border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; }
.push-preferences > * { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; }
.push-preferences > * + * { border-top: 1px solid var(--panel-border); }
.push-preferences strong { display: block; font-size: .85rem; }
.push-preferences small { display: block; color: var(--muted); font-size: .75rem; margin-top: 4px; }
.push-preferences input { width: 20px; height: 20px; flex: 0 0 20px; accent-color: var(--primary); }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-help { font-size: .75rem; line-height: 1.5; }
@media (max-width: 520px) {
  .notifications-dialog .profile-dialog-toolbar { padding: 14px 16px; }
  .account-section-tabs { padding: 8px 10px; }
  .account-section-tabs button { font-size: .77rem; }
  .notification-panel, #profile-dialog .profile-dialog-content { padding: 14px; }
  .profile-dialog-heading { padding: 16px 14px 0; }
  .notification-panel .profile-notification-title strong { font-size: .88rem; }
}
#profile-dev-messages-title { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.notifications-dialog [hidden] { display: none !important; }
#notifications-dialog .profile-dev-messages-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
#notifications-dialog .profile-dev-messages-head .btn { width: auto; min-width: 0; }

/* Action-specific push preferences stay compact until a group is opened. */
.push-preference-groups { display: grid; gap: 10px; margin: 16px 0; }
.push-preference-group { margin: 0; padding: 0; min-width: 0; border: 1px solid var(--panel-border); border-radius: 12px; overflow: hidden; }
.push-preference-group > summary { display: flex; align-items: center; gap: 10px; padding: 14px; cursor: pointer; list-style: none; }
.push-preference-group > summary::-webkit-details-marker { display: none; }
.push-preference-group > summary::before { content: '›'; color: var(--primary); font-size: 1.2rem; line-height: 1; transform: rotate(0); transition: transform 150ms ease; }
.push-preference-group[open] > summary::before { transform: rotate(90deg); }
.push-preference-group > summary strong { min-width: 0; font-size: .88rem; }
.push-preference-group [data-push-group-count] { margin-left: auto; color: var(--muted); font-size: .73rem; white-space: nowrap; font-weight: 500; }
.push-preference-group .push-preferences { margin: 0; border: 0; border-top: 1px solid var(--panel-border); border-radius: 0; }
.push-preference-group .push-preferences > p { display: block; margin: 0; }
.push-preference-group label > span { min-width: 0; }
.push-preference-group summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -3px; }
