:root {
  --gold: #e8af57;
  --olive: #5b5e3f;
  --dark: #0a0a0a;
  --panel: #161616;
  --panel-hover: #1f1f1f;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --accent: #00ffaa;
}

body {
  background: var(--dark);
  color: var(--text);
  font-family: "Oswald", sans-serif;
  margin: 0;
  overflow-x: hidden;
}

header {
  background: #000;
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

.top-bar {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  width: 70px;
  height: 70px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
  background-color: #222;
}

.modal-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  margin: 0 auto 15px;
  display: block;
}

.branding h1 {
  margin: 0;
  font-size: 1.8rem;
  letter-spacing: 2px;
  color: var(--gold);
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.stats-row p {
  margin: 0;
  font-size: 0.9rem;
  color: #888;
}

#force-strength {
  color: var(--accent);
  font-family: "Roboto Mono";
  font-size: 0.85rem;
  background: rgba(0, 255, 170, 0.1);
  padding: 4px 10px;
  border: 1px solid rgba(0, 255, 170, 0.3);
  border-radius: 4px;
}

#platoon-tabs {
  background: #080808;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  color: #666;
  padding: 15px 40px;
  font-family: "Oswald";
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: 0.3s;
}

.tab-btn:hover {
  color: #aaa;
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: #111;
}

.platoon-header {
  font-size: 2.8rem;
  color: var(--gold);
  text-transform: uppercase;
  margin: 40px auto 10px;
  max-width: 1460px;
  border-left: 8px solid var(--olive);
  padding-left: 20px;
}

.leader-banner {
  max-width: 1460px;
  margin: 0 auto 40px;
  font-family: "Roboto Mono";
  color: #aaa;
  font-size: 1.1rem;
  padding-left: 28px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.squad-block {
  max-width: 1460px;
  margin: 0 auto 40px;
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.squad-block.drag-over {
  border-color: var(--gold);
  box-shadow: 0 0 15px rgba(232, 175, 87, 0.3);
}

.squad-title {
  background: var(--olive);
  color: white;
  padding: 12px 25px;
  font-size: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.squad-actions {
  display: flex;
  gap: 10px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  padding: 20px;
  min-height: 120px;
}

@media (max-width: 1200px) {
  .member-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

.member-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  position: relative;
  transition: 0.2s;
}

.member-card.viewable {
  cursor: pointer;
}

.member-card.viewable:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(232, 175, 87, 0.2);
}

.member-card[draggable="true"] {
  cursor: grab;
}

.member-card[draggable="true"]:active {
  cursor: grabbing;
}

.member-card:hover {
  background: var(--panel-hover);
  border-color: #444;
}

.member-card.dragging {
  opacity: 0.4;
  border: 2px dashed var(--gold);
  transform: scale(0.98);
}

.member-card.drag-over-card {
  border: 2px dashed var(--accent) !important;
  opacity: 0.7;
}

.rank {
  color: var(--gold);
  font-family: "Roboto Mono";
  font-size: 1rem;
  font-weight: bold;
}

.nick {
  display: block;
  font-size: 1.6rem;
  margin: 8px 0 12px;
  color: #fff;
}

.details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: "Roboto Mono";
  font-size: 0.9rem;
  color: #999;
}

.details span strong {
  color: #ccc;
}

.card-actions {
  margin-top: 15px;
  display: flex;
  gap: 8px;
  border-top: 1px solid #333;
  padding-top: 10px;
}

#login-btn,
#logistics-btn {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  font-family: "Oswald";
  font-size: 1rem;
  border-radius: 4px;
  transition: 0.2s;
  margin-left: 10px;
}

#logistics-btn {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
}

#logistics-btn:hover {
  background: rgba(232, 175, 87, 0.1);
}

#login-btn:hover {
  background: #fff;
}

.btn-sm {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid #555;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: 4px;
  flex: 1;
}

.btn-sm.delete {
  border-color: #7a2b2b;
  color: #ff6b6b;
}

.btn-sm.delete:hover {
  background: #7a2b2b;
  color: white;
}

.btn-sm:hover {
  background: var(--gold);
  color: black;
  border-color: var(--gold);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 4000;
}

.hidden {
  display: none !important;
}

.modal-content {
  background: #111;
  padding: 35px;
  border: 2px solid var(--gold);
  border-radius: 8px;
  width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
}

.login-box {
  width: 350px;
  text-align: center;
}

.login-box h2 {
  color: var(--gold);
  margin-bottom: 25px;
}

/* AUTH INPUTS */
.auth-input {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: "Roboto Mono", monospace;
  text-align: center;
  border-radius: 4px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

.auth-input:focus {
  outline: none;
  box-shadow: 0 0 15px rgba(232, 175, 87, 0.4);
  background: rgba(0, 0, 0, 0.8);
}

.auth-input::placeholder {
  color: rgba(232, 175, 87, 0.4);
}

.input-group {
  margin-bottom: 15px;
}

.input-group label {
  display: block;
  margin-bottom: 5px;
  color: var(--gold);
  font-size: 0.9rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 10px;
  background: #000;
  border: 1px solid #444;
  color: white;
  font-family: "Roboto Mono";
  box-sizing: border-box;
}

.row {
  display: flex;
  gap: 10px;
}

.modal-footer {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.btn-save {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 12px;
  flex: 2;
  font-weight: bold;
  font-family: "Oswald";
  cursor: pointer;
  font-size: 1.1rem;
}

.btn-cancel {
  background: transparent;
  color: white;
  border: 1px solid #555;
  padding: 12px;
  flex: 1;
  cursor: pointer;
  font-family: "Oswald";
}

.btn-save:hover {
  background: #fff;
}

.btn-cancel:hover {
  background: #333;
}

/* View Modal Specifics */
.view-header {
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid #333;
  padding-bottom: 15px;
  margin-bottom: 20px;
}
.view-rank {
  font-size: 2.2rem;
  color: var(--gold);
  font-family: "Roboto Mono";
  font-weight: bold;
}
.view-nick {
  font-size: 2rem;
  margin: 0;
  color: #fff;
}
.view-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: "Roboto Mono";
  font-size: 1rem;
  color: #999;
  border-bottom: 1px dashed #222;
  padding-bottom: 5px;
}
.view-row strong {
  color: white;
}
.close-view {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  color: #666;
  font-size: 2rem;
  cursor: pointer;
  transition: 0.2s;
}
.close-view:hover {
  color: white;
}

.admin-action-btn {
  background: transparent;
  border: 1px dashed var(--gold);
  color: var(--gold);
  padding: 15px 30px;
  margin: 20px auto 40px;
  display: block;
  cursor: pointer;
  font-family: "Oswald";
  font-size: 1.1rem;
  transition: 0.3s;
}

.admin-action-btn:hover {
  background: rgba(232, 175, 87, 0.1);
  transform: scale(1.02);
}

/* Guidelines */
.orbat-guidelines {
  background: #080808;
  border-bottom: 2px solid var(--border);
  padding: 12px 20px;
  text-align: center;
  font-family: "Roboto Mono", monospace;
  font-size: 0.75rem;
  color: #777;
}

.orbat-guidelines p {
  margin: 4px 0;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.orbat-guidelines strong {
  color: var(--gold);
}

/* Status Badges */
.status-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: bold;
  font-family: "Roboto Mono";
  text-transform: uppercase;
  letter-spacing: 1px;
}

.status-active {
  background: rgba(0, 255, 170, 0.1);
  color: var(--accent);
  border: 1px solid rgba(0, 255, 170, 0.3);
}
.status-inactive {
  background: rgba(150, 150, 150, 0.1);
  color: #aaa;
  border: 1px solid rgba(150, 150, 150, 0.3);
}
.status-loa {
  background: rgba(255, 200, 0, 0.1);
  color: #ffcc00;
  border: 1px solid rgba(255, 200, 0, 0.3);
}
.status-mia {
  background: rgba(255, 100, 0, 0.1);
  color: #ff6600;
  border: 1px solid rgba(255, 100, 0, 0.3);
}
.status-awol {
  background: rgba(255, 0, 0, 0.1);
  color: #ff4444;
  border: 1px solid rgba(255, 0, 0, 0.3);
}

/* Logistics Report Panel (Paper UI) */
.logistics-panel {
  position: fixed;
  top: 0;
  right: -500px;
  width: 400px;
  height: 100vh;
  background: #f4ebd8;
  color: #2b2b2b;
  font-family: "Courier New", Courier, monospace;
  box-shadow: inset 0 0 60px rgba(139, 115, 85, 0.2),
    -5px 0 25px rgba(0, 0, 0, 0.8);
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 3000;
  padding: 40px;
  box-sizing: border-box;
  overflow-y: auto;
  border-left: 2px solid #c4b59d;
  display: flex;
  flex-direction: column;
}

.logistics-panel.open {
  right: 0;
}

.close-logistics {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #5b5e3f;
}

.logistics-header {
  text-align: center;
  border-bottom: 2px solid #5b5e3f;
  margin-bottom: 30px;
  padding-bottom: 15px;
}

.logistics-header h2 {
  margin: 0;
  font-family: "Oswald", sans-serif;
  letter-spacing: 1px;
  color: #3b3d28;
}

.logistics-header p {
  margin: 5px 0 0;
  font-size: 0.9rem;
  font-weight: bold;
}

.logistics-content {
  flex-grow: 1;
}

.logistics-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 1.1rem;
  border-bottom: 1px dashed #c4b59d;
  padding-bottom: 5px;
}

.logistics-item strong {
  color: #8c2626;
}

.btn-reset-logistics {
  background: transparent;
  border: 2px solid #8c2626;
  color: #8c2626;
  font-family: "Oswald", sans-serif;
  font-size: 1rem;
  padding: 12px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 30px;
  transition: 0.2s;
}

.btn-reset-logistics:hover {
  background: #8c2626;
  color: #f4ebd8;
}

.signature-text {
  font-family: "Caveat", cursive;
  font-size: 3rem;
  color: var(--gold);
  margin: 20px 0;
  text-align: center;
  text-shadow: 0 0 10px rgba(232, 175, 87, 0.3);
}