/* ==========================================
   GLOBAL VARIABLES & RESET
   ========================================== */
:root {
  --bg: #0b0f17;
  --panel: #161b26;
  --border: #2a3245;
  --red: #e53935;
  --red-hover: #b71c1c;
  --green: #43a047;
  --blue: #1e88e5;
  --purple: #8e24aa;
  --orange: #fb8c00;
  --text: #c9d1d9;
  --text-bright: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.tmp-header {
  background-color: var(--panel);
  border-bottom: 2px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tmp-top-bar {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 65px;
}

.logo {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-bright);
  letter-spacing: 0.5px;
}

.logo span {
  color: var(--red);
}

.tmp-nav {
  display: flex;
  gap: 4px;
}

.nav-item {
  position: relative;
}

.nav-item button {
  background: none;
  border: none;
  color: var(--text);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.nav-item button:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-bright);
}

.btn-staff-tab {
  color: var(--orange) !important;
  border: 1px solid var(--orange) !important;
}

.btn-staff-tab:hover {
  background-color: rgba(251, 140, 0, 0.1) !important;
}

/* ==========================================
   DROPDOWN MENUS
   ========================================== */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--panel);
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  border-top: 2px solid var(--red);
  border-radius: 0 0 6px 6px;
  z-index: 1000;
}

.dropdown-content a {
  color: var(--text);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background 0.2s, color 0.2s;
}

.dropdown-content a:hover {
  background-color: var(--red);
  color: var(--text-bright);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* ==========================================
   USER PROFILE & ACTION BUTTONS
   ========================================== */
.user-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  color: var(--text-bright);
}

.role-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 800;
}

.role-owner {
  background-color: var(--purple);
  color: #ffffff;
}

.role-admin {
  background-color: var(--red);
  color: #ffffff;
}

.role-moderator {
  background-color: var(--orange);
  color: #ffffff;
}

.role-player {
  background-color: var(--blue);
  color: #ffffff;
}

.btn-login {
  background-color: #1f2838;
  color: #ffffff;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.btn-login:hover {
  background-color: #2a374d;
}

.btn-download {
  background-color: var(--red);
  color: var(--text-bright);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.btn-download:hover {
  background-color: var(--red-hover);
}

/* ==========================================
   MAIN CONTENT AREA
   ========================================== */
.main-container {
  max-width: 1200px;
  width: 100%;
  margin: 30px auto;
  padding: 0 20px;
  flex: 1;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  color: var(--text-bright);
  font-size: 1.6rem;
  margin-bottom: 4px;
}

.section-header p {
  color: #8b949e;
  font-size: 0.95rem;
}

/* ==========================================
   GRIDS, CARDS & PANELS
   ========================================== */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
}

.server-card {
  background-color: var(--panel);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
}

.server-card h3 {
  color: var(--text-bright);
  font-size: 1.05rem;
}

.progress-bar-bg {
  background-color: rgba(255, 255, 255, 0.08);
  height: 8px;
  border-radius: 4px;
  margin: 12px 0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--red);
  border-radius: 4px;
}

.panel-box {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow: hidden;
}

.admin-box h3 {
  color: var(--text-bright);
  margin-bottom: 12px;
  font-size: 1.1rem;
}

/* ==========================================
   FORM CONTROLS & TABLES
   ========================================== */
.role-form {
  display: flex;
  gap: 10px;
}

.role-form input,
.role-form select,
.form-group input,
.form-group select {
  background-color: #0f131c;
  border: 1px solid var(--border);
  color: var(--text-bright);
  padding: 8px 12px;
  border-radius: 4px;
  outline: none;
  font-size: 0.9rem;
}

.role-form input {
  flex: 1;
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th,
.custom-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.custom-table th {
  background-color: rgba(0, 0, 0, 0.3);
  color: #8b949e;
}

.custom-table td {
  color: var(--text);
}

/* ==========================================
   BUTTON VARIATIONS
   ========================================== */
.btn-primary {
  background-color: var(--red);
  color: var(--text-bright);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background-color: var(--red-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--blue);
  color: var(--blue);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-outline:hover {
  background-color: rgba(30, 136, 229, 0.1);
}

.btn-kick {
  background-color: var(--orange);
  color: #ffffff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn-ban {
  background-color: var(--red);
  color: #ffffff;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

/* ==========================================
   MODALS & OVERLAYS
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.modal-box {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 400px;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  color: var(--text-bright);
}

.close-btn {
  cursor: pointer;
  font-size: 1.4rem;
  color: #8b949e;
}

.close-btn:hover {
  color: var(--text-bright);
}

.form-group {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  color: #8b949e;
}

.launcher-info-box {
  background-color: #0f131c;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  font-size: 0.85rem;
}

.launcher-info-box ul {
  list-style: none;
  margin-top: 8px;
}

.launcher-info-box li {
  color: var(--green);
  line-height: 1.6;
}
