* {
  box-sizing: border-box;
}

:root {
  --bg-1: #090b0f;
  --bg-2: #10141b;
  --panel: rgba(20, 25, 34, 0.88);
  --panel-2: rgba(14, 18, 26, 0.92);
  --border: rgba(143, 209, 158, 0.18);
  --text: #f3f6f8;
  --muted: #9ea8b3;
  --accent: #8fd19e;
  --accent-2: #5dbb77;
  --danger: #ff7272;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(93, 187, 119, 0.16), transparent 35%),
    radial-gradient(circle at bottom right, rgba(143, 209, 158, 0.08), transparent 30%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}

.background-overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.35;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 32px;
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

.login-shell {
  width: 100%;
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
  margin: auto;
}

.brand-panel,
.card {
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.brand-panel {
  background: linear-gradient(180deg, rgba(18, 25, 32, 0.94), rgba(10, 14, 20, 0.96));
  padding: 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(143, 209, 158, 0.14);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 12px;
  margin-bottom: 18px;
}

.brand-panel h1 {
  margin: 0 0 12px;
  font-size: 48px;
  line-height: 1.05;
  color: var(--text);
}

.tagline {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.feature-list {
  margin-top: 34px;
  display: grid;
  gap: 16px;
}

.feature-item {
  padding: 18px 20px;
  border: 1px solid rgba(143, 209, 158, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.feature-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.feature-text {
  display: block;
  color: var(--muted);
  line-height: 1.5;
}

.card {
  background: var(--panel-2);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 34px;
}

.card-text {
  margin: 0 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  font-size: 14px;
  font-weight: 700;
  color: #d9e1e8;
}

input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(9, 12, 17, 0.95);
  color: white;
  font-size: 15px;
  outline: none;
  transition: 0.2s ease;
}

input:focus {
  border-color: rgba(143, 209, 158, 0.65);
  box-shadow: 0 0 0 4px rgba(143, 209, 158, 0.12);
}

button {
  margin-top: 6px;
  padding: 15px 18px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08110b;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 12px 24px rgba(93, 187, 119, 0.22);
}

button:hover {
  transform: translateY(-1px);
  opacity: 0.98;
}

.message {
  min-height: 24px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(12, 16, 22, 0.88);
  box-shadow: var(--shadow);
}

.topbar h1 {
  margin: 0;
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav a {
  text-decoration: none;
  color: #dce7de;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(143, 209, 158, 0.12);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

#memberInfo p,
#barsInfo p,
#factionInfo p {
  margin: 10px 0;
  color: var(--text);
}

#memberInfo strong,
#barsInfo strong,
#factionInfo strong {
  color: var(--accent);
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(143,209,158,0.12);
  padding: 14px;
  border-radius: 12px;
}

.label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.value {
  font-size: 16px;
  font-weight: bold;
  color: var(--accent);
}

.bar-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bar-row span {
  font-size: 13px;
  color: var(--muted);
}

.bar {
  width: 100%;
  height: 10px;
  background: rgba(255,255,255,0.08);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 6px;
}

.bar-fill {
  height: 100%;
  border-radius: 6px;
}

.bar-green {
  background: linear-gradient(90deg, #3bd671, #7ef7a3);
}

.bar-orange {
  background: linear-gradient(90deg, #ff8c42, #ffb066);
}

.bar-yellow {
  background: linear-gradient(90deg, #ffd84d, #fff27a);
}

.bar-blue {
  background: linear-gradient(90deg, #4da3ff, #7fc8ff);
}

.page-intro {
  margin-bottom: 24px;
}

.resource-library {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.resource-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.resource-section-header {
  padding: 0 4px;
}

.resource-section-header h2 {
  margin: 0;
  color: var(--text);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.resource-card {
  min-height: 240px;
  padding: 0;
}

.resource-card-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  height: 100%;
  padding: 24px;
}

.resource-top {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.resource-type {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(143, 209, 158, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.resource-card h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 22px;
}

.resource-card .card-text {
  margin: 0;
}

.resource-actions {
  margin-top: auto;
}

.resource-btn {
  display: inline-block;
  padding: 11px 16px;
  border-radius: 12px;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08110b;
  font-weight: 800;
}

.resource-btn:hover {
  opacity: 0.96;
}

@media (max-width: 1000px) {
  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel h1 {
    font-size: 38px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 18px;
  }

  .brand-panel,
  .card {
    padding: 24px;
    border-radius: 18px;
  }

  .brand-panel h1 {
    font-size: 30px;
  }

  .card h2 {
    font-size: 28px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}

.roster-toolbar {
  margin-bottom: 20px;
}

.roster-toolbar-row {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 14px;
}

.roster-summary {
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

.roster-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.roster-table th,
.roster-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid rgba(143, 209, 158, 0.10);
  vertical-align: top;
}

.roster-table th {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.roster-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.roster-name-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.roster-name {
  font-weight: 800;
  color: var(--text);
}

.roster-id {
  color: var(--muted);
  font-size: 12px;
}

.roster-status-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.roster-status-cell small {
  color: var(--muted);
  line-height: 1.4;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

.badge-online {
  background: rgba(59, 214, 113, 0.16);
  color: #7ef7a3;
}

.badge-idle {
  background: rgba(255, 216, 77, 0.15);
  color: #ffe57e;
}

.badge-offline {
  background: rgba(255,255,255,0.08);
  color: #c7d0d8;
}

.badge-okay {
  background: rgba(77, 163, 255, 0.16);
  color: #8fc4ff;
}

.badge-hospital {
  background: rgba(255, 114, 114, 0.16);
  color: #ff9b9b;
}

.badge-travel {
  background: rgba(168, 118, 255, 0.16);
  color: #c9a8ff;
}

.badge-jail {
  background: rgba(255, 140, 66, 0.16);
  color: #ffbb84;
}

.badge-revive-yes {
  background: rgba(59, 214, 113, 0.16);
  color: #7ef7a3;
}

.badge-revive-no {
  background: rgba(255, 114, 114, 0.16);
  color: #ff9b9b;
}

@media (max-width: 800px) {
  .roster-toolbar-row {
    grid-template-columns: 1fr;
  }
}
.roster-name-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.roster-name-link:hover {
  text-decoration: underline;
}
.inline-link-btn {
  display: inline-block;
  padding: 6px 12px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(143, 209, 158, 0.15);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid rgba(143, 209, 158, 0.25);
  transition: all 0.2s ease;
}

.inline-link-btn:hover {
  background: rgba(143, 209, 158, 0.25);
  box-shadow: 0 0 10px rgba(143, 209, 158, 0.25);
  transform: translateY(-1px);
}
.war-controls {
  margin-bottom: 24px;
}

.war-controls-grid {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: end;
}

.war-controls-actions {
  display: flex;
  align-items: end;
}

.warroom-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.war-column {
  justify-content: flex-start;
}

.war-column-header {
  margin-bottom: 18px;
}

.war-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.war-empty {
  color: var(--muted);
  padding: 18px;
  border: 1px dashed rgba(143, 209, 158, 0.16);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
}

.war-member-card {
  border: 1px solid rgba(143, 209, 158, 0.12);
  border-radius: 16px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
}

.enemy-card {
  border-color: rgba(255, 114, 114, 0.16);
}

.war-member-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.war-member-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.war-member-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

.war-member-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.war-meta-text {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.war-member-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.war-member-details strong {
  color: var(--accent);
}

.war-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-btn {
  background: rgba(255,255,255,0.06);
  color: var(--text);
}

.secondary-btn:hover {
  opacity: 0.95;
}

.badge-priority-high {
  background: rgba(255, 114, 114, 0.16);
  color: #ff9b9b;
}

.badge-priority-medium {
  background: rgba(255, 216, 77, 0.16);
  color: #ffe57e;
}

.badge-priority-low {
  background: rgba(77, 163, 255, 0.16);
  color: #8fc4ff;
}

.badge-priority-watch {
  background: rgba(168, 118, 255, 0.16);
  color: #c9a8ff;
}

@media (max-width: 1000px) {
  .warroom-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .war-controls-grid {
    grid-template-columns: 1fr;
  }
}